Payroll
The Payroll entity, mapped to the payroll table.
| Table | payroll |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 10 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/Payroll.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
payrollId | Integer | payroll_id | — | primary key, generated |
payrollRunDate | LocalDate | payroll_run_date | — | — |
periodStartDate | LocalDate | period_start_date | — | — |
periodEndDate | LocalDate | period_end_date | — | — |
status | String | status | — | — |
payFrequency | PayFrequency | pay_frequency | Yes | enum |
createdBy | String | created_by | Yes | — |
createdDate | LocalDateTime | created_date | Yes | — |
lastModifiedBy | String | last_modified_by | Yes | — |
lastModifiedDate | LocalDateTime | last_modified_date | 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 |
|---|---|---|
| PayrollApproval | payroll | @ManyToOne |
| PayrollChange | payroll | @ManyToOne |
| PayrollTransaction | payroll | @ManyToOne |
| Payslip | payroll | @ManyToOne |
| RecognitionAward | payroll | @ManyToOne |
Neighbourhood
Repository
PayrollRepository
Declared over Payroll with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PayrollRepository.java
| Method | Returns | Notes |
|---|---|---|
existsOverlappingPeriod(@Param("periodStartDate") LocalDate periodStartDate, @Param("periodEndDate") LocalDate periodEndDate, @Param("excludedStatuses") Collection<String> excludedStatuses) | boolean | explicit @Query |
findLatestPeriodEndDate(@Param("excludedStatuses") Collection<String> excludedStatuses) | LocalDate | explicit @Query |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Payroll.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DemoDataController | /api/system-admin/demo-data | 3 | Billing & Platform |
| PayrollChangesController | /api/payroll-changes | 1 | Payroll |
| PayrollController | /api/payroll | 8 | Payroll |
| PayrollTransactionController | /api/payroll-transactions | 6 | Payroll |
| RecognitionAwardController | /api/recognition-awards | 7 | HR |
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/.