API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · shift_assignments

Shift Assignment Schema

ID del esquema
shift_assignment
Colección
shift_assignments
Permisos
  • Leershift_assignment_view
  • Crearshift_assignment_create
  • Modificarshift_assignment_edit
  • Eliminarshift_assignment_delete

Campos

Shift Assignment Schema

shift_assignments4 permisos

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.

employeeIduuidobligatorio

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

userIduuidopcional

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.

admite null
shiftBlockIduuidobligatorio

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

coverageDemandIduuidopcional

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

admite null
roleSlotIdstringopcional

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

máx. 100 caracteresadmite null
datedateobligatorio

Date of the shift (YYYY-MM-DD)

startTimeOverridestringopcional

Override start time for this specific assignment

Patrónadmite null
endTimeOverridestringopcional

Override end time for this specific assignment

Patrónadmite null
statusstringopcional

Assignment status

PLANNEDCONFIRMEDSWAPPEDCANCELLEDOPEN
Valor por defecto: "PLANNED"
swappedWithUserIduuidopcional

User UUID if this shift was swapped

admite null
notesstringopcional
máx. 2000 caracteresadmite null
schedulePeriodIduuidopcional

UUID of the schedule period this assignment belongs to

admite null
solverGeneratedbooleanopcional

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

Valor por defecto: false
aiExplanationstringopcional

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

máx. 2000 caracteresadmite null
preferenceScorenumberopcional

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 – 1admite null
confirmedByEmployeebooleanopcional
Valor por defecto: false
confirmedAtdatetimeopcional
admite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/shift_assignments — Lista, paginada y filtrable
  • GET /api/v1/shift_assignments/<id> — Una entidad
  • POST /api/v1/shift_assignments — Crear
  • PATCH /api/v1/shift_assignments/<id> — Actualización parcial
  • DELETE /api/v1/shift_assignments/<id> — Eliminación lógica
  • GET /api/v1/shift_assignments/<id>/timeline — Auditoría y actividades

Búsqueda