app.time_entries
TablaSeguridad a nivel de fila activa
Clock-in and clock-out punches. Entries of one person never overlap (invariant 20). Every change is written to app.time_entry_audit, and a change inside an approved timesheet voids the approval (invariant 19).
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 worked.Hace referencia a app.projects.id |
| membership_id | uuid | Sí | Membership of the person who worked; NULL for external crew, who work through engagement_id.Hace referencia a app.memberships.id |
| shift_id | uuid | Sí | Shift of the same person and project the entry works, when there is one.Hace referencia a app.shifts.id |
| clock_in | timestamp with time zone | No | When work started. |
| clock_out | timestamp with time zone | Sí | When work stopped; NULL while clocked in. |
| break_minutes | integer | No | Unpaid break minutes inside the entry. |
| source | app.time_entry_source | No | Web, Mobile or Kiosk. |
| kiosk_device_id | uuid | Sí | Kiosk device the punch came from, for Kiosk entries.Hace referencia a app.kiosk_devices.id |
| 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 |
| auto_closed_at | timestamp with time zone | Sí | When the platform closed an entry left open longer than 16 hours; NULL when the person or a correction closed it. |
| needs_review | boolean | No | True while an entry needs a supervisor's review, for example after an automatic close or a skewed punch. |
| engagement_id | uuid | Sí | Engagement of the external person who worked, when they have no membership. Exactly one of membership_id and engagement_id.Hace referencia a app.engagements.id |