Position
The Position entity, mapped to the position table.
| Table | position |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 4 |
| Relationships | 1 |
| Source | backend/src/main/java/com/motorph/payroll/model/Position.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
positionId | Integer | position_id | — | primary key, generated |
positionName | String | position_name | — | — |
description | String | description | Yes | — |
isArchived | Boolean | is_archived | — | — |
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 |
|---|---|---|---|---|
department | @ManyToOne | Department | department_id | Yes |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| Employee | position | @ManyToOne |
| JobOffer | position | @ManyToOne |
| JobRequisition | position | @ManyToOne |
Neighbourhood
Repository
PositionRepository
Declared over Position with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PositionRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByDepartment_DepartmentId(Integer departmentId) | List<Position> | derived |
findAllBy() | List<Position> | derived |
findWithDepartmentByPositionId(Integer positionId) | Optional<Position> | derived |
existsByDepartment_DepartmentId(Integer departmentId) | boolean | derived |
existsByPositionNameIgnoreCaseAndDepartment_DepartmentId(String positionName, Integer departmentId) | boolean | derived |
existsByPositionNameIgnoreCaseAndDepartment_DepartmentIdAndPositionIdNot(String positionName, Integer departmentId, Integer positionId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Position.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DepartmentController | /api/departments | 8 | HR |
| EmployeeController | /api/employees | 9 | HR |
| JobOfferController | /api/job-offers | 6 | Recruitment |
| JobRequisitionController | /api/job-requisitions | 8 | Recruitment |
| PositionController | /api/positions | 8 | HR |
| 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/.