Daily Closing Schema
Campos
Daily Closing Schema
Persistent confirmation that a user has reviewed and closed their workday. Captures guard results, override reasons, and is automatically superseded when post-close changes happen.
userId
User who owns this daily closing
date
Date of the daily closing (ISO YYYY-MM-DD, tenant-local time)
orgUnitId
Org unit (team) this closing belongs to at closing time. Nullable for tenants without formal org structure.
policyId
Effective policy that governed this closing
closedAt
Timestamp when the day was closed
guardResults
Snapshot of guard evaluations at closing time
overrides
Guards that the user closed with a reason override
notes
Snapshot of the daily_note content as of closing time; subsequent edits on the daily_note do not change this field
recapId
FK to daily_overview_recaps if a self-scope recap was generated for this date
supersededAt
Set when a post-close mutation (time_record/phone_call/remote_session/calendar_event) invalidates this closing; user must create a fresh closing
resetAt
Set when the OWNER deliberately took this closing back (ADR 0533). Distinct from supersededAt, which an automatic supersede also sets: only a deliberate reset earns the escalation grace period (the day is not counted as missed until the end of the following day). Absent on closings from before ADR 0533 — treated as "no grace", i.e. the previous behaviour.
supersededBy
time_record_changephone_call_changeremote_session_changecalendar_event_changemanualsupersededRefId
ID of the entity whose change triggered the supersede
Ningún campo coincide con el filtro.
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/daily_closings— Lista, paginada y filtrableGET /api/v1/daily_closings/<id>— Una entidadPOST /api/v1/daily_closings— CrearPATCH /api/v1/daily_closings/<id>— Actualización parcialDELETE /api/v1/daily_closings/<id>— Eliminación lógicaGET /api/v1/daily_closings/<id>/timeline— Auditoría y actividades