CustomerOrderItem
The CustomerOrderItem entity, mapped to the customer_order_item table.
| Table | customer_order_item |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 4 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/CustomerOrderItem.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
orderItemId | Integer | order_item_id | — | primary key, generated |
quantity | Integer | quantity | — | — |
unitPrice | BigDecimal | unit_price | — | — |
totalPrice | BigDecimal | total_price | — | — |
Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
order | @ManyToOne | CustomerOrder | order_id | Yes |
item | @ManyToOne | InventoryItem | item_id | Yes |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| CustomerOrder | items | @OneToMany |
Neighbourhood
Repository
No Spring Data repository is declared over this entity. It is reached through another entity's association, through the EntityManager directly, or it is written only by a migration.
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.