Shift Assignment Schema
Felder
Shift Assignment Schema
A concrete staffing entry: one employee occupies one role-slot of one coverage-demand using one shift-block on one date. Together with the coverage-demand.coverageWindow, the set of assignments determines whether the demand is fully covered.
employeeId
UUID of the employee profile — canonical key (ADR 0122). Shifts can be planned for employees without a linked user account (Aushilfen, Subunternehmer, Azubis ohne IT-Konto).
userId
Linked user UUID (denormalised from `employee_profile.userId` for fast personal-calendar lookups). `null` when the employee has no login. Writers must keep it in sync.
shiftBlockId
UUID of the shift-block (time bucket). Required — the time + ArbZG semantics of the assignment come from this block.
coverageDemandId
UUID of the coverage-demand this assignment fills. Null for ad-hoc shifts that do not belong to any demand (e.g. Springer, training time blocked off as a shift).
roleSlotId
When coverageDemandId is set, this is the slotId of the role within coverage-demand.roles[] that the employee occupies. Null when coverageDemandId is null.
date
Date of the shift (YYYY-MM-DD)
startTimeOverride
Override start time for this specific assignment
endTimeOverride
Override end time for this specific assignment
status
Assignment status
PLANNEDCONFIRMEDSWAPPEDCANCELLEDOPENswappedWithUserId
User UUID if this shift was swapped
notes
schedulePeriodId
UUID of the schedule period this assignment belongs to
solverGenerated
True if generated by the scheduling solver (CP-SAT / greedy fallback). Manually-created or manually-edited assignments stay false.
aiExplanation
LLM-rendered German-language explanation of why the solver made this assignment (generated post-solve by schedule-evaluation.service via Claude).
preferenceScore
Normalised employee preference for this employee × shift-block combination, in [-1, 1]. Mapping: LOVE=1.0, PREFER=0.7, NEUTRAL=0.5, AVOID=0.1, NEVER=-1.0. NEVER is a soft penalty, not a veto — the solver may still assign a NEVER block when no feasible alternative exists (such cases are reported in qualityReport.neverViolations).
confirmedByEmployee
confirmedAt
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/shift_assignments— Liste, paginiert + filterbarGET /api/v1/shift_assignments/<id>— Einzelne EntityPOST /api/v1/shift_assignments— AnlegenPATCH /api/v1/shift_assignments/<id>— Teil-UpdateDELETE /api/v1/shift_assignments/<id>— Soft-DeleteGET /api/v1/shift_assignments/<id>/timeline— Audit + Aktivitäten