Skip to main content

Bonus

The Bonus entity, mapped to the bonus table.

Tablebonus
Tenant-scopedYes — extends TenantOwned
Columns8
Relationships1
Sourcebackend/src/main/java/com/motorph/payroll/model/Bonus.java

Columns​

FieldTypeColumnNullNotes
bonusIdIntegerbonus_id—primary key, generated
bonusAmountBigDecimalbonus_amount——
bonusDateLocalDatebonus_date——
descriptionStringdescription——
createdByStringcreated_by——
createdDateLocalDateTimecreated_date——
lastModifiedByStringlast_modified_byYes—
lastModifiedDateLocalDateTimelast_modified_dateYes—

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
employee@ManyToOneEmployeeemployee_numberYes

Neighbourhood​

Repository​

BonusRepository​

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

MethodReturnsNotes
findWithEmployeeByBonusId(Integer bonusId)Optional<Bonus>derived
findYearToDateBonusForAllEmployees(@Param("year") Integer year)List<EmployeeBonusYtdDto>explicit @Query
findMonthlyBonusTotal(@Param("year") Integer year, @Param("month") Integer month)BigDecimalexplicit @Query
findYearToDateBonusForEmployee(@Param("employeeNumber") Integer employeeNumber, @Param("year") Integer year, @Param("excludeBonusId") Integer excludeBonusId)BigDecimalexplicit @Query

Reached by​

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

ControllerBase pathEndpointsModule
BonusController/api/bonuses6Payroll
DemoDataController/api/system-admin/demo-data3Billing & Platform
GovernmentFormsController/api/government-forms8PH Statutory
ReportingController/api/reports16Platform Misc

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