Skip to main content

InventoryLot

The InventoryLot entity, mapped to the inventory_lot table.

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

Columns​

FieldTypeColumnNullNotes
lotIdIntegerlot_id—primary key, generated
lotNoStringlot_no——
qtyReceivedIntegerqty_received——
qtyRemainingIntegerqty_remaining——
expiryDateLocalDateexpiry_dateYes—
notesStringnotesYes—
createdAtLocalDateTimecreated_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
item@ManyToOneInventoryItemitem_idYes
location@ManyToOneWarehouseLocationlocation_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

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

ControllerBase pathEndpointsModule
InventoryController/api/inventory38Inventory & Portal
SerialLotController/api/inventory5Inventory & 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/.