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

Shift Assignment Schema

Schema-ID
shift_assignment
Collection
shift_assignments
Permissions
  • Lesenshift_assignment_view
  • Anlegenshift_assignment_create
  • Ändernshift_assignment_edit
  • Löschenshift_assignment_delete

Felder

Shift Assignment Schema

shift_assignments4 Permissions

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.

employeeIduuiderforderlich

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

userIduuidoptional

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
shiftBlockIduuiderforderlich

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

coverageDemandIduuidoptional

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
roleSlotIdstringoptional

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 Zeichennullable
datedateerforderlich

Date of the shift (YYYY-MM-DD)

startTimeOverridestringoptional

Override start time for this specific assignment

Patternnullable
endTimeOverridestringoptional

Override end time for this specific assignment

Patternnullable
statusstringoptional

Assignment status

PLANNEDCONFIRMEDSWAPPEDCANCELLEDOPEN
Default: "PLANNED"
swappedWithUserIduuidoptional

User UUID if this shift was swapped

nullable
notesstringoptional
max 2000 Zeichennullable
schedulePeriodIduuidoptional

UUID of the schedule period this assignment belongs to

nullable
solverGeneratedbooleanoptional

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

Default: false
aiExplanationstringoptional

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

max 2000 Zeichennullable
preferenceScorenumberoptional

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
confirmedByEmployeebooleanoptional
Default: false
confirmedAtdatetimeoptional
nullable

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

Suche