Warehouse
The Warehouse entity, mapped to the warehouse table.
| Table | warehouse |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 5 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/Warehouse.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
warehouseId | Integer | warehouse_id | — | primary key, generated |
name | String | name | — | unique |
address | String | address | Yes | — |
description | String | description | Yes | — |
warehouseType | String | warehouse_type | — | WAREHOUSE, or STORE for a store's own stock location (V164). |
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.
Referenced by
| Entity | Field | Kind |
|---|---|---|
| CustomerOrder | warehouse | @ManyToOne |
| Store | warehouse | @ManyToOne |
| WarehouseLocation | warehouse | @ManyToOne |
Neighbourhood
Repository
WarehouseRepository
Declared over Warehouse with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/WarehouseRepository.java
| Method | Returns | Notes |
|---|---|---|
existsByNameIgnoreCase(String name) | boolean | derived |
existsByNameIgnoreCaseAndWarehouseIdNot(String name, Integer warehouseId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Warehouse.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| InventoryController | /api/inventory | 38 | Inventory & Portal |
| PortalAdminController | /api/portal/admin | 4 | Inventory & Portal |
| PortalOrderController | /api/portal/orders | 7 | Inventory & Portal |
| StoreController | /api/inventory/stores | 7 | 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/.