ItemPrice
The ItemPrice entity, mapped to the item_price table.
| Table | item_price |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 11 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/ItemPrice.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
priceId | Integer | price_id | — | primary key, generated |
priceType | String | price_type | — | — |
priceName | String | price_name | Yes | — |
unitPrice | BigDecimal | unit_price | — | — |
minQuantity | Integer | min_quantity | — | — |
validFrom | LocalDate | valid_from | Yes | — |
validTo | LocalDate | valid_to | Yes | — |
isActive | Boolean | is_active | — | — |
notes | String | notes | Yes | — |
createdAt | LocalDateTime | created_at | — | — |
updatedAt | LocalDateTime | updated_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 | — |
createdBy | @ManyToOne | User | created_by | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| ItemPriceHistory | price | @ManyToOne |
Neighbourhood
Repository
ItemPriceRepository
Declared over ItemPrice with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/ItemPriceRepository.java
| Method | Returns | Notes |
|---|---|---|
findByItem_ItemIdAndIsActiveTrueOrderByPriceTypeAscUnitPriceAsc(Integer itemId) | List<ItemPrice> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over ItemPrice.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| ItemPriceController | — | 6 | 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/.