API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · position_assignments

Position Assignment Schema

Schema-ID
position_assignment
Collection
position_assignments
Permissions
  • Lesenposition_assignment_view
  • Anlegenposition_assignment_create
  • Ändernposition_assignment_edit
  • Löschenposition_assignment_delete

Felder

Position Assignment Schema

position_assignments4 Permissions

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.

positionIduuiderforderlich

FK position._id

employeeProfileIduuiderforderlich

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.

assignmentKindstringerforderlich

PRIMARY: regular full assignment. SECONDARY: parallel role. ACTING/INTERIM: temporary, validTo required. DEPUTY: standing-deputy mapping.

PRIMARYSECONDARYACTINGDEPUTYINTERIM
isPrimaryForEmployeebooleanerforderlich

Settings inheritance anchor. Exactly one active assignment per employee MUST have isPrimaryForEmployee=true (validated in middleware + DB unique partial index).

Default: false
validFromdateerforderlich

First day this assignment is effective (ISO date).

validTodateoptional

Last day this assignment is effective. NULL = open-ended. Required when assignmentKind ∈ {ACTING, INTERIM}.

nullable
backdatedReasonstringoptional

Required reason when validFrom is in the past (audit trail). Enforced by middleware, not schema.

max 1000 Zeichennullable
notesstringoptional

Free-text HR note for this assignment.

max 2000 Zeichennullable

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 + filterbar
  • GET /api/v1/position_assignments/<id> — Einzelne Entity
  • POST /api/v1/position_assignments — Anlegen
  • PATCH /api/v1/position_assignments/<id> — Teil-Update
  • DELETE /api/v1/position_assignments/<id> — Soft-Delete
  • GET /api/v1/position_assignments/<id>/timeline — Audit + Aktivitäten

Suche