Employee
The Employee entity, mapped to the employee table.
| Table | employee |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 39 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/Employee.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
employeeNumber | Integer | employee_number | — | primary key, generated |
lastName | String | last_name | — | — |
firstName | String | first_name | — | — |
middleName | String | middle_name | Yes | — |
nationality | String | nationality | Yes | — |
birthday | LocalDate | birthday | — | — |
dateHired | LocalDate | date_hired | — | — |
address | String | address | — | — |
phoneNumber | String | phone_number | — | — |
rdoCode | String | rdo_code | Yes | — |
zipCode | String | zip_code | Yes | — |
localAddress | String | local_address | Yes | — |
localZipCode | String | local_zip_code | Yes | — |
foreignAddress | String | foreign_address | Yes | — |
sssNumber | String | sss_number | — | unique |
philhealthNumber | String | philhealth_number | — | unique |
tinNumber | String | tin_number | — | unique |
pagibigNumber | String | pagibig_number | — | unique |
status | String | status | — | — |
separationDate | LocalDate | separation_date | Yes | — |
separationReason | String | separation_reason | Yes | — |
basicSalary | BigDecimal | basic_salary | — | — |
riceSubsidy | BigDecimal | rice_subsidy | — | — |
phoneAllowance | BigDecimal | phone_allowance | — | — |
clothingAllowance | BigDecimal | clothing_allowance | — | — |
grossSemiMonthlyRate | BigDecimal | gross_semi_monthly_rate | — | — |
hourlyRate | BigDecimal | hourly_rate | — | — |
isDeleted | Boolean | is_deleted | — | — |
minimumWageEarner | Boolean | minimum_wage_earner | — | Statutory minimum wage earner: pay is exempt and reported on BIR 1601-C items 15/16. |
workRegionCode | String | work_region_code | Yes | Region where the employee works (NCR, IV-A, VII, ...), not where they live. |
workCityMunicipality | String | work_city_municipality | Yes | — |
wageWorkerClassification | String | wage_worker_classification | Yes | The wage order's sector / establishment class (NON_AGRICULTURE, RETAIL_SERVICE_15_OR_LESS, ...). |
payBasis | String | pay_basis | Yes | How the wage is set: MONTHLY, DAILY or HOURLY. |
wageExemption | String | wage_exemption | Yes | NONE, or an exemption claimed (BMBE, BOARD_EXEMPTION, OTHER); a claim is always reviewed. |
wageExemptionNote | String | wage_exemption_note | Yes | — |
bankName | String | bank_name | Yes | — |
bankAccountName | String | bank_account_name | Yes | — |
bankAccountNumberCiphertext | String | bank_account_number | Yes | The account number ENCRYPTED (AES-256-GCM, see PayoutCipher), never plaintext. |
payoutMethod | String | payout_method | — | — |
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 |
|---|---|---|---|---|
position | @ManyToOne | Position | position_id | Yes |
restDays | @OneToMany | EmployeeRestDay | mapped by employee | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| Announcement | createdBy | @ManyToOne |
| Bonus | employee | @ManyToOne |
| ChatMessage | sender | @ManyToOne |
| ChatMessage | recipient | @ManyToOne |
| Conversation | participant1 | @ManyToOne |
| Conversation | participant2 | @ManyToOne |
| CrmActivity | owner | @ManyToOne |
| CrmContact | owner | @ManyToOne |
| CrmContact | createdBy | @ManyToOne |
| CrmDeal | owner | @ManyToOne |
| CrmDeal | accountManager | @ManyToOne |
| CrmLead | assignedTo | @ManyToOne |
| CrmNote | createdBy | @ManyToOne |
| CrmOrganization | owner | @ManyToOne |
| CrmOrganization | createdBy | @ManyToOne |
| EmployeeDeduction | employee | @ManyToOne |
| EmployeeRestDay | employee | @ManyToOne |
| FringeBenefit | employee | @ManyToOne |
| InterviewFeedback | interviewer | @ManyToOne |
| InterviewSchedule | interviewer | @ManyToOne |
| JobApplicant | referredBy | @ManyToOne |
| JobOffer | createdBy | @ManyToOne |
| JobRequisition | requestedBy | @ManyToOne |
| LeaveBalance | employee | @ManyToOne |
| LeaveRequest | employee | @ManyToOne |
| LeaveRequest | approver | @ManyToOne |
| Notification | employee | @ManyToOne |
| OvertimeRequest | employee | @ManyToOne |
| PayrollApproval | approver | @ManyToOne |
| Payslip | employee | @ManyToOne |
| RecognitionAward | employee | @ManyToOne |
| ReimbursementRequest | employee | @ManyToOne |
| ReimbursementRequest | approvedBy | @ManyToOne |
| ReimbursementRequest | processedBy | @ManyToOne |
| StaffingPlan | createdBy | @ManyToOne |
| Timesheet | employee | @ManyToOne |
| Timesheet | approver | @ManyToOne |
| TinCompliance | employee | @ManyToOne |
Neighbourhood
12 of 40 associations shown; the tables above are complete.
Repository
EmployeeRepository
Declared over Employee with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/EmployeeRepository.java
| Method | Returns | Notes |
|---|---|---|
findWithPositionByEmployeeNumber(Integer employeeNumber) | Optional<Employee> | derived |
existsByPosition_PositionId(Integer positionId) | boolean | derived |
existsBySssNumber(String sssNumber) | boolean | derived |
existsBySssNumberAndEmployeeNumberNot(String sssNumber, Integer employeeNumber) | boolean | derived |
existsByPhilhealthNumber(String philhealthNumber) | boolean | derived |
existsByPhilhealthNumberAndEmployeeNumberNot(String philhealthNumber, Integer employeeNumber) | boolean | derived |
existsByTinNumber(String tinNumber) | boolean | derived |
existsByTinNumberAndEmployeeNumberNot(String tinNumber, Integer employeeNumber) | boolean | derived |
existsByPagibigNumber(String pagibigNumber) | boolean | derived |
existsByPagibigNumberAndEmployeeNumberNot(String pagibigNumber, Integer employeeNumber) | boolean | derived |
countBillableByTenantId(@Param("tenantId") Integer tenantId) | long | explicit @Query |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Employee.
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/.