PayrollTransaction
The PayrollTransaction entity, mapped to the payroll_transactions table.
| Table | payroll_transactions |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 5 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/PayrollTransaction.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
transactionId | Integer | transaction_id | — | primary key, generated |
transactionType | String | transaction_type | — | — |
transactionAmount | BigDecimal | transaction_amount | — | — |
transactionDate | LocalDate | transaction_date | — | — |
description | String | description | 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.
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
payroll | @ManyToOne | Payroll | payroll_id | Yes |
payslip | @ManyToOne | Payslip | payslip_id | Yes |
Neighbourhood
Repository
PayrollTransactionRepository
Declared over PayrollTransaction with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PayrollTransactionRepository.java
| Method | Returns | Notes |
|---|---|---|
findWithDetailsByTransactionId(Integer transactionId) | Optional<PayrollTransaction> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over PayrollTransaction.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| PayrollTransactionController | /api/payroll-transactions | 6 | Payroll |
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/.