Skip to main content

WarehouseLocation

The WarehouseLocation entity, mapped to the warehouse_location table.

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

Columns​

FieldTypeColumnNullNotes
locationIdIntegerlocation_id—primary key, generated
zoneStringzoneYes—
binCodeStringbin_code——
descriptionStringdescriptionYes—
locationTypeStringlocation_type——
activebooleanis_active——
sortOrderintsort_order——

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
warehouse@ManyToOneWarehousewarehouse_idYes
parent@ManyToOneWarehouseLocationparent_location_id—

Referenced by​

EntityFieldKind
InventoryLotlocation@ManyToOne
InventoryStocklocation@ManyToOne
ItemSeriallocation@ManyToOne
PurchaseReceivingItemlocation@ManyToOne
StockTransactionlocation@ManyToOne
WarehouseLocationparent@ManyToOne
WarehouseTransferfromLocation@ManyToOne
WarehouseTransfertoLocation@ManyToOne

Neighbourhood​

Repository​

WarehouseLocationRepository​

Declared over WarehouseLocation with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/WarehouseLocationRepository.java

MethodReturnsNotes
findAllByWarehouse_WarehouseId(Integer warehouseId)List<WarehouseLocation>derived
existsByWarehouse_WarehouseIdAndBinCodeIgnoreCase(Integer warehouseId, String binCode)booleanderived
existsByWarehouse_WarehouseIdAndBinCodeIgnoreCaseAndLocationIdNot(Integer warehouseId, String binCode, Integer locationId)booleanderived
existsByWarehouse_WarehouseId(Integer warehouseId)booleanderived
existsByParent_LocationIdAndActiveTrue(Integer parentLocationId)booleanderived
findAllByWarehouse_WarehouseIdAndActiveTrue(Integer warehouseId)List<WarehouseLocation>derived
findLocationsWithStockByWarehouseId(Integer warehouseId)List<WarehouseLocation>explicit @Query

Reached by​

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

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