OvertimeRequest
The OvertimeRequest entity, mapped to the overtime_request table.
| Table | overtime_request |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 6 |
| Relationships | 1 |
| Source | backend/src/main/java/com/motorph/payroll/model/OvertimeRequest.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
requestId | Integer | request_id | — | primary key, generated |
dateRequested | LocalDate | date_requested | — | — |
overtimeDate | LocalDate | overtime_date | — | — |
hoursRequested | BigDecimal | hours_requested | — | — |
status | String | status | — | — |
hrRemarks | String | hr_remarks | 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 |
|---|---|---|---|---|
employee | @ManyToOne | Employee | employee_id | Yes |
Neighbourhood
Repository
OvertimeRequestRepository
Declared over OvertimeRequest with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/OvertimeRequestRepository.java
| Method | Returns | Notes |
|---|---|---|
findWithEmployeeByRequestId(Integer requestId) | Optional<OvertimeRequest> | derived |
findAllByEmployee_EmployeeNumberOrderByOvertimeDateDesc(Integer employeeId) | List<OvertimeRequest> | derived |
existsByEmployee_EmployeeNumberAndOvertimeDate(Integer employeeId, LocalDate overtimeDate) | boolean | derived |
existsByEmployee_EmployeeNumberAndOvertimeDateAndRequestIdNot(Integer employeeId, LocalDate overtimeDate, Integer requestId) | boolean | derived |
findAllByEmployee_EmployeeNumberAndStatusAndOvertimeDateBetween(Integer employeeId, String status, LocalDate start, LocalDate end) | List<OvertimeRequest> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over OvertimeRequest.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DemoDataController | /api/system-admin/demo-data | 3 | Billing & Platform |
| OvertimeRequestController | /api/overtime-requests | 7 | HR |
| PayrollController | /api/payroll | 8 | Payroll |
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/.