Skip to content

app.time_entries

TableRow level security on

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

Primary key: id

Columns of app.time_entries
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.projects on insert; never accepted from the caller and never changed.References app.organizations.id
project_iduuidNoProject worked.References app.projects.id
membership_iduuidYesMembership of the person who worked; NULL for external crew, who work through engagement_id.References app.memberships.id
shift_iduuidYesShift of the same person and project the entry works, when there is one.References app.shifts.id
clock_intimestamp with time zoneNoWhen work started.
clock_outtimestamp with time zoneYesWhen work stopped; NULL while clocked in.
break_minutesintegerNoUnpaid break minutes inside the entry.
sourceapp.time_entry_sourceNoWeb, Mobile or Kiosk.
kiosk_device_iduuidYesKiosk device the punch came from, for Kiosk entries.References app.kiosk_devices.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
auto_closed_attimestamp with time zoneYesWhen the platform closed an entry left open longer than 16 hours; NULL when the person or a correction closed it.
needs_reviewbooleanNoTrue while an entry needs a supervisor's review, for example after an automatic close or a skewed punch.
engagement_iduuidYesEngagement of the external person who worked, when they have no membership. Exactly one of membership_id and engagement_id.References app.engagements.id