ItemSerial
The ItemSerial entity, mapped to the item_serial table.
| Table | item_serial |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 5 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/ItemSerial.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
serialId | Integer | serial_id | — | primary key, generated |
serialNo | String | serial_no | — | — |
status | String | status | — | — |
receivedAt | LocalDateTime | received_at | — | — |
notes | String | notes | Yes | — |
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 |
|---|---|---|---|---|
item | @ManyToOne | InventoryItem | item_id | Yes |
location | @ManyToOne | WarehouseLocation | location_id | — |
Neighbourhood
Repository
ItemSerialRepository
Declared over ItemSerial with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/ItemSerialRepository.java
| Method | Returns | Notes |
|---|---|---|
findByItem_ItemIdAndSerialNoIgnoreCase(Integer itemId, String serialNo) | Optional<ItemSerial> | derived |
existsByItem_ItemIdAndSerialNoIgnoreCase(Integer itemId, String serialNo) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over ItemSerial.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| InventoryController | /api/inventory | 38 | Inventory & Portal |
| SerialLotController | /api/inventory | 5 | Inventory & 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/.