Data Model
Core Doctrine entities organized by domain.
Entity Relationship Diagram
Sale Domain
| Entity | Table | Key Fields | Description |
|---|---|---|---|
| Sale | mz_sale | id, magento_id, status, customer_* | Order record synced from Magento |
| SaleProduct | mz_sale_product | id, sale_id, product_id, qty, status | Order line item |
| SaleLog | mz_sale_log | id, sale_id, old_status, new_status | Status change journal |
| SaleSav | — | id, sale_id, type, status | After-sales case (returns, claims) |
:::info Sale status flow
pending > processing > complete > canceled / closed
See the Glossary for detailed status definitions. :::
Product Domain
| Entity | Table | Key Fields | Description |
|---|---|---|---|
| Product | mz_product | id, sku, ean, name, qty | Product catalog entry |
| ProductQtyLog | — | id, product_id, qty_change, type | Stock mutation journal |
| EanProduct | mz_ean_product | id, sku, ean | EAN-to-SKU mapping |
| Container | — | id, arrival_date, status | Stock arrival container from supplier |
Shipping Domain
| Entity | Table | Key Fields | Description |
|---|---|---|---|
| SaleProductShipment | — | id, sale_product_id, carrier, tracking | Shipment record per sale product |
:::info SaleProduct status flow
Processing Not Printed > Shipped > Delivered > Returned
:::
Financial Domain
| Entity | Table | Key Fields | Description |
|---|---|---|---|
| Refund | — | id, sale_id, amount, status | Refund record |
| RefundLog | — | id, refund_id, action | Refund audit trail |
| PaylineTransactionLog | — | id, transaction_id, amount, status | Payline transaction log |
Queue Domain
| Entity | Table | Key Fields | Description |
|---|---|---|---|
| Queue | — | id, model, status, number_of_trials | Async job record (SQL-backed) |
tip
The Queue entity works alongside RabbitMQ. SQL-backed queues are used for jobs that need persistence and retry tracking. See Queue Debugging for operational procedures.
See also
- Event System — domain events triggered by entity changes
- Glossary — definitions of all terms
- Sales Import workflow — how Sale entities are created