Skip to main content

StaffingPlan

The StaffingPlan entity, mapped to the staffing_plan table.

Tablestaffing_plan
Tenant-scopedYes — extends TenantOwned
Columns6
Relationships3
Sourcebackend/src/main/java/com/motorph/payroll/model/StaffingPlan.java

Columns​

FieldTypeColumnNullNotes
planIdIntegerplan_id—primary key, generated
planNameStringplan_name——
fiscalYearIntegerfiscal_year——
totalBudgetBigDecimaltotal_budgetYes—
statusStringstatus——
createdAtLocalDateTimecreated_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​

FieldKindTargetJoin columnRequired
department@ManyToOneDepartmentdepartment_id—
createdBy@ManyToOneEmployeecreated_byYes
items@OneToManyStaffingPlanItemmapped by plan—

Referenced by​

EntityFieldKind
StaffingPlanItemplan@ManyToOne

Neighbourhood​

Repository​

StaffingPlanRepository​

Declared over StaffingPlan with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/StaffingPlanRepository.java

MethodReturnsNotes
findWithDetailsByPlanId(Integer planId)Optional<StaffingPlan>derived
findAllByOrderByFiscalYearDescPlanIdDesc()List<StaffingPlan>derived

Reached by​

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

ControllerBase pathEndpointsModule
StaffingPlanController/api/staffing-plans7Recruitment

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/.