StaffingPlanItem
The StaffingPlanItem entity, mapped to the staffing_plan_item table.
| Table | staffing_plan_item |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 4 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/StaffingPlanItem.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
itemId | Integer | item_id | — | primary key, generated |
roleTitle | String | role_title | — | — |
numVacancies | Integer | num_vacancies | — | — |
estimatedCost | BigDecimal | estimated_cost | 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.
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
plan | @ManyToOne | StaffingPlan | plan_id | Yes |
requisition | @ManyToOne | JobRequisition | requisition_id | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| StaffingPlan | items | @OneToMany |
Neighbourhood
Repository
StaffingPlanItemRepository
Declared over StaffingPlanItem with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/StaffingPlanItemRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByPlan_PlanId(Integer planId) | List<StaffingPlanItem> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over StaffingPlanItem.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| StaffingPlanController | /api/staffing-plans | 7 | Recruitment |
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/.