Skip to main content

Employee

The Employee entity, mapped to the employee table.

Tableemployee
Tenant-scopedYes — extends TenantOwned
Columns39
Relationships2
Sourcebackend/src/main/java/com/motorph/payroll/model/Employee.java

Columns​

FieldTypeColumnNullNotes
employeeNumberIntegeremployee_number—primary key, generated
lastNameStringlast_name——
firstNameStringfirst_name——
middleNameStringmiddle_nameYes—
nationalityStringnationalityYes—
birthdayLocalDatebirthday——
dateHiredLocalDatedate_hired——
addressStringaddress——
phoneNumberStringphone_number——
rdoCodeStringrdo_codeYes—
zipCodeStringzip_codeYes—
localAddressStringlocal_addressYes—
localZipCodeStringlocal_zip_codeYes—
foreignAddressStringforeign_addressYes—
sssNumberStringsss_number—unique
philhealthNumberStringphilhealth_number—unique
tinNumberStringtin_number—unique
pagibigNumberStringpagibig_number—unique
statusStringstatus——
separationDateLocalDateseparation_dateYes—
separationReasonStringseparation_reasonYes—
basicSalaryBigDecimalbasic_salary——
riceSubsidyBigDecimalrice_subsidy——
phoneAllowanceBigDecimalphone_allowance——
clothingAllowanceBigDecimalclothing_allowance——
grossSemiMonthlyRateBigDecimalgross_semi_monthly_rate——
hourlyRateBigDecimalhourly_rate——
isDeletedBooleanis_deleted——
minimumWageEarnerBooleanminimum_wage_earner—Statutory minimum wage earner: pay is exempt and reported on BIR 1601-C items 15/16.
workRegionCodeStringwork_region_codeYesRegion where the employee works (NCR, IV-A, VII, ...), not where they live.
workCityMunicipalityStringwork_city_municipalityYes—
wageWorkerClassificationStringwage_worker_classificationYesThe wage order's sector / establishment class (NON_AGRICULTURE, RETAIL_SERVICE_15_OR_LESS, ...).
payBasisStringpay_basisYesHow the wage is set: MONTHLY, DAILY or HOURLY.
wageExemptionStringwage_exemptionYesNONE, or an exemption claimed (BMBE, BOARD_EXEMPTION, OTHER); a claim is always reviewed.
wageExemptionNoteStringwage_exemption_noteYes—
bankNameStringbank_nameYes—
bankAccountNameStringbank_account_nameYes—
bankAccountNumberCiphertextStringbank_account_numberYesThe account number ENCRYPTED (AES-256-GCM, see PayoutCipher), never plaintext.
payoutMethodStringpayout_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​

FieldKindTargetJoin columnRequired
position@ManyToOnePositionposition_idYes
restDays@OneToManyEmployeeRestDaymapped by employee—

Referenced by​

EntityFieldKind
AnnouncementcreatedBy@ManyToOne
Bonusemployee@ManyToOne
ChatMessagesender@ManyToOne
ChatMessagerecipient@ManyToOne
Conversationparticipant1@ManyToOne
Conversationparticipant2@ManyToOne
CrmActivityowner@ManyToOne
CrmContactowner@ManyToOne
CrmContactcreatedBy@ManyToOne
CrmDealowner@ManyToOne
CrmDealaccountManager@ManyToOne
CrmLeadassignedTo@ManyToOne
CrmNotecreatedBy@ManyToOne
CrmOrganizationowner@ManyToOne
CrmOrganizationcreatedBy@ManyToOne
EmployeeDeductionemployee@ManyToOne
EmployeeRestDayemployee@ManyToOne
FringeBenefitemployee@ManyToOne
InterviewFeedbackinterviewer@ManyToOne
InterviewScheduleinterviewer@ManyToOne
JobApplicantreferredBy@ManyToOne
JobOffercreatedBy@ManyToOne
JobRequisitionrequestedBy@ManyToOne
LeaveBalanceemployee@ManyToOne
LeaveRequestemployee@ManyToOne
LeaveRequestapprover@ManyToOne
Notificationemployee@ManyToOne
OvertimeRequestemployee@ManyToOne
PayrollApprovalapprover@ManyToOne
Payslipemployee@ManyToOne
RecognitionAwardemployee@ManyToOne
ReimbursementRequestemployee@ManyToOne
ReimbursementRequestapprovedBy@ManyToOne
ReimbursementRequestprocessedBy@ManyToOne
StaffingPlancreatedBy@ManyToOne
Timesheetemployee@ManyToOne
Timesheetapprover@ManyToOne
TinComplianceemployee@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

MethodReturnsNotes
findWithPositionByEmployeeNumber(Integer employeeNumber)Optional<Employee>derived
existsByPosition_PositionId(Integer positionId)booleanderived
existsBySssNumber(String sssNumber)booleanderived
existsBySssNumberAndEmployeeNumberNot(String sssNumber, Integer employeeNumber)booleanderived
existsByPhilhealthNumber(String philhealthNumber)booleanderived
existsByPhilhealthNumberAndEmployeeNumberNot(String philhealthNumber, Integer employeeNumber)booleanderived
existsByTinNumber(String tinNumber)booleanderived
existsByTinNumberAndEmployeeNumberNot(String tinNumber, Integer employeeNumber)booleanderived
existsByPagibigNumber(String pagibigNumber)booleanderived
existsByPagibigNumberAndEmployeeNumberNot(String pagibigNumber, Integer employeeNumber)booleanderived
countBillableByTenantId(@Param("tenantId") Integer tenantId)longexplicit @Query

Reached by​

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

ControllerBase pathEndpointsModule
AnnouncementController/api/announcements7HR
AuthController/api/auth7Auth & Identity
BillingController/api/billing6Billing & Platform
BillingWebhookController/api/webhooks1Billing & Platform
BonusController/api/bonuses6Payroll
ConversationController/api/conversations5Platform Misc
CrmActivityController/api/crm/activities5CRM
CrmContactController/api/crm/contacts6CRM
CrmDealController/api/crm/deals11CRM
CrmLeadController/api/crm/leads7CRM
CrmOrganizationController/api/crm/organizations5CRM
DemoDataController/api/system-admin/demo-data3Billing & Platform
EmployeeController/api/employees9HR
EmployeeDeductionController/api/employee-deductions5Payroll
EmployeePayoutController/api/employees/{employeeNumber}/payout4HR
GovernmentFormsController/api/government-forms16PH Statutory
InterviewFeedbackController/api/interview-feedback2Recruitment
InterviewScheduleController/api/interview-schedules8Recruitment
JobApplicantController/api/job-applicants11Recruitment
JobOfferController/api/job-offers6Recruitment
JobRequisitionController/api/job-requisitions8Recruitment
LeaveBalanceController/api/leave-balances1HR
LeaveRequestController/api/leave-requests7HR
NotificationController/api/notifications3Platform Misc
OrderController/api/inventory/orders6Inventory & Portal
OvertimeRequestController/api/overtime-requests7HR
PayrollController/api/payroll10Payroll
PositionController/api/positions8HR
PublicBillingController/api/public/billing1Billing & Platform
PublicJobController/api/public3Recruitment
PublicPayrollSimulatorController/api/public/payroll-simulator3Payroll
ReimbursementRequestController/api/reimbursement-requests7Payroll
ReimbursementTransactionController/api/reimbursement-transactions6Payroll
ReportingController/api/reports16Platform Misc
StaffingPlanController/api/staffing-plans7Recruitment
TimesheetController/api/timesheets10HR
TinComplianceController/api/tin-compliance5PH Statutory
UserController/api/users5Auth & Identity
WithholdingRegistryController/api6PH Statutory

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