DepartmentController
| Base path | /api/departments |
| Module | HR |
| Endpoints | 8 |
| OpenAPI tag | Departments |
| Source | backend/src/main/java/com/motorph/payroll/controller/DepartmentController.java |
Endpoints
| Method | Path | Requires | Handler |
|---|---|---|---|
GET | /api/departments | hr.employees.view | list() |
GET | /api/departments/search | hr.employees.view | search() |
GET | /api/departments/{id} | hr.employees.view | getById() |
POST | /api/departments | hr.employees.manage | create() |
PUT | /api/departments/{id} | hr.employees.manage | update() |
DELETE | /api/departments/{id} | hr.employees.manage | delete() |
PATCH | /api/departments/{id}/archive | hr.employees.manage | archive() |
PATCH | /api/departments/{id}/restore | hr.employees.manage | restore() |
Notes
PATCH /api/departments/{id}/restore— Restores an archived department.
Call chain
Dependencies
Constructor-injected by Lombok's @RequiredArgsConstructor: DepartmentService.
Tables reached
| Entity | Table | Tenant-scoped |
|---|---|---|
| Department | department | Yes |
| Position | position | Yes |
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/.