DeductionType
Custom (non-statutory) deduction type an admin can assign to employees, e.g.
| Table | deduction_types |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 10 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/DeductionType.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
deductionTypeId | Integer | deduction_type_id | — | primary key, generated |
code | String | code | — | — |
name | String | name | — | — |
category | String | category | — | — |
description | String | description | Yes | — |
defaultAmount | BigDecimal | default_amount | Yes | — |
active | Boolean | active | — | — |
createdDate | LocalDateTime | created_date | Yes | — |
lastModifiedBy | String | last_modified_by | Yes | — |
lastModifiedDate | LocalDateTime | last_modified_date | 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.
Referenced by
| Entity | Field | Kind |
|---|---|---|
| EmployeeDeduction | deductionType | @ManyToOne |
Neighbourhood
Repository
DeductionTypeRepository
Declared over DeductionType with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/DeductionTypeRepository.java
| Method | Returns | Notes |
|---|---|---|
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.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DeductionTypeController | /api/deduction-types | 4 | Payroll |
| EmployeeDeductionController | /api/employee-deductions | 5 | Payroll |
| PublicSignupController | /api/public/signup | 2 | Billing & Platform |
| TenantAdminController | /api/admin/tenants | 7 | Billing & 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/.