Skip to main content

InventoryOrder

The InventoryOrder entity, mapped to the inventory_order table.

Tableinventory_order
Tenant-scopedYes — extends TenantOwned
Columns7
Relationships2
Sourcebackend/src/main/java/com/motorph/payroll/model/InventoryOrder.java

Columns​

FieldTypeColumnNullNotes
orderIdIntegerorder_id—primary key, generated
orderNoStringorder_no—unique
titleStringtitle——
descriptionStringdescriptionYes—
statusStringstatus——
createdAtLocalDateTimecreated_at——
updatedAtLocalDateTimeupdated_at——

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​

FieldKindTargetJoin columnRequired
createdBy@ManyToOneUsercreated_by—
stages@OneToManyOrderStagemapped by order—

Referenced by​

EntityFieldKind
OrderStageorder@ManyToOne

Neighbourhood​

Repository​

InventoryOrderRepository​

Declared over InventoryOrder with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/InventoryOrderRepository.java

MethodReturnsNotes
countByCreatedAtBetween(LocalDateTime from, LocalDateTime to)longderived

Reached by​

These controllers hold — directly or through a service they depend on — a repository over InventoryOrder.

ControllerBase pathEndpointsModule
OrderController/api/inventory/orders6Inventory & Portal

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/.