Skip to main content

Data Model

Core Doctrine entities organized by domain.

Entity Relationship Diagram

Sale Domain

EntityTableKey FieldsDescription
Salemz_saleid, magento_id, status, customer_*Order record synced from Magento
SaleProductmz_sale_productid, sale_id, product_id, qty, statusOrder line item
SaleLogmz_sale_logid, sale_id, old_status, new_statusStatus change journal
SaleSavid, sale_id, type, statusAfter-sales case (returns, claims)

:::info Sale status flow pending > processing > complete > canceled / closed

See the Glossary for detailed status definitions. :::

Product Domain

EntityTableKey FieldsDescription
Productmz_productid, sku, ean, name, qtyProduct catalog entry
ProductQtyLogid, product_id, qty_change, typeStock mutation journal
EanProductmz_ean_productid, sku, eanEAN-to-SKU mapping
Containerid, arrival_date, statusStock arrival container from supplier

Shipping Domain

EntityTableKey FieldsDescription
SaleProductShipmentid, sale_product_id, carrier, trackingShipment record per sale product

:::info SaleProduct status flow Processing Not Printed > Shipped > Delivered > Returned :::

Financial Domain

EntityTableKey FieldsDescription
Refundid, sale_id, amount, statusRefund record
RefundLogid, refund_id, actionRefund audit trail
PaylineTransactionLogid, transaction_id, amount, statusPayline transaction log

Queue Domain

EntityTableKey FieldsDescription
Queueid, model, status, number_of_trialsAsync 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