app.shifts
TablaSeguridad a nivel de fila activa
Crew shifts: one person (or an open slot) in one role for one block of time on a project. A shift cannot end before it starts (invariant 20).
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| project_id | uuid | No | Project the shift works on.Hace referencia a app.projects.id |
| record_id | uuid | Sí | Shift record of the same project the shift staffs, when planned through one.Hace referencia a app.records.id |
| scope_node_id | uuid | Sí | Scope node of the same project, such as the show.Hace referencia a app.scope_nodes.id |
| membership_id | uuid | Sí | Membership of the assigned person; NULL for an open shift.Hace referencia a app.memberships.id |
| role_code | text | Sí | Canon role worked (Roles Library).Hace referencia a xpms.role.role_code |
| starts_at | timestamp with time zone | No | Call time. |
| ends_at | timestamp with time zone | No | End of the shift; after starts_at. |
| time_zone | text | No | IANA zone the shift times were typed in. |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| shift_state | app.shift_state | No | Shift state. Changes only through app.transition_shift, app.publish_shifts, app.accept_shift and app.claim_open_shift. |
| engagement_id | uuid | Sí | Engagement of the external person assigned, when the shift is worked by someone without a membership. At most one of membership_id and engagement_id; neither is an open shift.Hace referencia a app.engagements.id |
| scheduled_break_minutes | integer | Sí | Meal break scheduled within the shift, in minutes. |