Entities
Table of Contents
Classes
- StockBatch
- Live `FIFO`/`FEFO` batch layers per item x warehouse x batch. Whole entity is server-managed
(written by services via raw DBAL) — serves reads (batches grid, stock item tab).
- StockDocument
- Stock document — draft is a full-replace object graph (movements owned collection). Posted
documents are immutable; the manager guards object-graph save to drafts only.
- StockItem
- Stock item; the admin object graph maps only the translations collection.
- StockItemText
- Stock item translations (cms_mod_store_stock_item_texts) — derived identity:
PK = languageId + parent stock item association (declared in the UI leaf).
- StockLevel
- Denormalized stock levels per item x warehouse. Written exclusively by services in the
same transaction as the movement journal — the entity serves reads (grids, availability).
- StockMovement
- Movement — owned collection StockDocument.movements (cascade persist/remove).
- StockMovementBatch
- Movement x batch pairing (precise `FIFO` `COGS`). Written by services via raw DBAL; the entity
serves reads (movement `COGS` breakdown). Read-only FK columns kept as plain scalars — it does
not belong to the draft object graph (no #[CollectionOf] on StockMovement).
- StockReservation
- Reservation ledger — rows are never deleted, status changes keep the audit trail and
idempotence per source ref. Written by the reservation service.
- Supplier
- Vacation
- Shipping exclusion window (vacation) affecting delivery estimates.
- VacationText
- Vacation translations (cms_mod_store_vacation_texts) — derived identity:
PK = languageId + parent vacation association (declared in the UI leaf).
- Warehouse
- WarehouseText
- Warehouse translations (cms_mod_store_warehouse_texts) — derived identity:
PK = languageId + parent warehouse association (declared in the UI leaf).