InventoryLot
The InventoryLot entity, mapped to the inventory_lot table.
| Table | inventory_lot |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 7 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/InventoryLot.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
lotId | Integer | lot_id | — | primary key, generated |
lotNo | String | lot_no | — | — |
qtyReceived | Integer | qty_received | — | — |
qtyRemaining | Integer | qty_remaining | — | — |
expiryDate | LocalDate | expiry_date | Yes | — |
notes | String | notes | Yes | — |
createdAt | LocalDateTime | created_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
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
item | @ManyToOne | InventoryItem | item_id | Yes |
location | @ManyToOne | WarehouseLocation | location_id | — |
Neighbourhood
Repository
InventoryLotRepository
Declared over InventoryLot with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/InventoryLotRepository.java
| Method | Returns | Notes |
|---|---|---|
findByItem_ItemIdAndLotNoIgnoreCase(Integer itemId, String lotNo) | Optional<InventoryLot> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over InventoryLot.
| 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/.