API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · shift_assignments

Shift Assignment Schema

ID du schéma
shift_assignment
Collection
shift_assignments
Autorisations
  • Lireshift_assignment_view
  • Créershift_assignment_create
  • Modifiershift_assignment_edit
  • Supprimershift_assignment_delete

Champs

Shift Assignment Schema

shift_assignments4 autorisations

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.

employeeIduuidobligatoire

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).

userIduuidfacultatif

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.

nullable
shiftBlockIduuidobligatoire

UUID of the shift-block (time bucket). Required — the time + ArbZG semantics of the assignment come from this block.

coverageDemandIduuidfacultatif

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).

nullable
roleSlotIdstringfacultatif

When coverageDemandId is set, this is the slotId of the role within coverage-demand.roles[] that the employee occupies. Null when coverageDemandId is null.

max. 100 caractèresnullable
datedateobligatoire

Date of the shift (YYYY-MM-DD)

startTimeOverridestringfacultatif

Override start time for this specific assignment

Motifnullable
endTimeOverridestringfacultatif

Override end time for this specific assignment

Motifnullable
statusstringfacultatif

Assignment status

PLANNEDCONFIRMEDSWAPPEDCANCELLEDOPEN
Par défaut : "PLANNED"
swappedWithUserIduuidfacultatif

User UUID if this shift was swapped

nullable
notesstringfacultatif
max. 2000 caractèresnullable
schedulePeriodIduuidfacultatif

UUID of the schedule period this assignment belongs to

nullable
solverGeneratedbooleanfacultatif

True if generated by the scheduling solver (CP-SAT / greedy fallback). Manually-created or manually-edited assignments stay false.

Par défaut : false
aiExplanationstringfacultatif

LLM-rendered German-language explanation of why the solver made this assignment (generated post-solve by schedule-evaluation.service via Claude).

max. 2000 caractèresnullable
preferenceScorenumberfacultatif

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).

-1 – 1nullable
confirmedByEmployeebooleanfacultatif
Par défaut : false
confirmedAtdatetimefacultatif
nullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/shift_assignments — Liste, paginée et filtrable
  • GET /api/v1/shift_assignments/<id> — Une entité
  • POST /api/v1/shift_assignments — Créer
  • PATCH /api/v1/shift_assignments/<id> — Mise à jour partielle
  • DELETE /api/v1/shift_assignments/<id> — Suppression logique
  • GET /api/v1/shift_assignments/<id>/timeline — Audit et activités

Recherche