Skip to main content

DeductionType

Custom (non-statutory) deduction type an admin can assign to employees, e.g.

Tablededuction_types
Tenant-scopedYes — extends TenantOwned
Columns10
Relationships0
Sourcebackend/src/main/java/com/motorph/payroll/model/DeductionType.java

Columns​

FieldTypeColumnNullNotes
deductionTypeIdIntegerdeduction_type_id—primary key, generated
codeStringcode——
nameStringname——
categoryStringcategory——
descriptionStringdescriptionYes—
defaultAmountBigDecimaldefault_amountYes—
activeBooleanactive——
createdDateLocalDateTimecreated_dateYes—
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.

Referenced by​

EntityFieldKind
EmployeeDeductiondeductionType@ManyToOne

Neighbourhood​

Repository​

DeductionTypeRepository​

Declared over DeductionType with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/DeductionTypeRepository.java

MethodReturnsNotes
findAllByOrderByCodeAsc()List<DeductionType>derived
findByCode(String code)Optional<DeductionType>derived

Reached by​

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

ControllerBase pathEndpointsModule
DeductionTypeController/api/deduction-types4Payroll
EmployeeDeductionController/api/employee-deductions5Payroll
PublicSignupController/api/public/signup2Billing & Platform
TenantAdminController/api/admin/tenants7Billing & Platform

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