Position Assignment Schema
Felder
Position Assignment Schema
Schema for the assignment of an employee to a position (Spec docs/specs/org-chart-v2.md, ADR 0097b + ADR 0136a). The canonical subject is `employeeProfileId` — this allows assigning employees who do not (yet) have a linked user account. Resolvers (manager / settings / required-documents) derive the userId via employee_profile.userId when needed; employee-only assignments are simply skipped where a user is required.
positionId
FK position._id
employeeProfileId
FK employee_profile._id. One employee can hold multiple positions. If the employee has a linked user (employee_profile.userId), resolvers map back to that user for authorization / approver / settings flows.
assignmentKind
PRIMARY: regular full assignment. SECONDARY: parallel role. ACTING/INTERIM: temporary, validTo required. DEPUTY: standing-deputy mapping.
PRIMARYSECONDARYACTINGDEPUTYINTERIMisPrimaryForEmployee
Settings inheritance anchor. Exactly one active assignment per employee MUST have isPrimaryForEmployee=true (validated in middleware + DB unique partial index).
validFrom
First day this assignment is effective (ISO date).
validTo
Last day this assignment is effective. NULL = open-ended. Required when assignmentKind ∈ {ACTING, INTERIM}.
backdatedReason
Required reason when validFrom is in the past (audit trail). Enforced by middleware, not schema.
notes
Free-text HR note for this assignment.
Keine Felder passen zum Filter.
Standard-Endpoints
Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:
GET /api/v1/position_assignments— Liste, paginiert + filterbarGET /api/v1/position_assignments/<id>— Einzelne EntityPOST /api/v1/position_assignments— AnlegenPATCH /api/v1/position_assignments/<id>— Teil-UpdateDELETE /api/v1/position_assignments/<id>— Soft-DeleteGET /api/v1/position_assignments/<id>/timeline— Audit + Aktivitäten