ItemCategory
The ItemCategory entity, mapped to the item_category table.
| Table | item_category |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 3 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/ItemCategory.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
categoryId | Integer | category_id | — | primary key, generated |
name | String | name | — | unique |
description | String | description | Yes | — |
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 |
|---|---|---|
| InventoryItem | category | @ManyToOne |
Neighbourhood
Repository
ItemCategoryRepository
Declared over ItemCategory with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/ItemCategoryRepository.java
| Method | Returns | Notes |
|---|---|---|
existsByNameIgnoreCase(String name) | boolean | derived |
existsByNameIgnoreCaseAndCategoryIdNot(String name, Integer categoryId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over ItemCategory.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| InventoryController | /api/inventory | 38 | 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/.