Skip to main content

Shift Record

Overview

The ShiftRecord entity represents individual instances of a shift at a location. While Shift defines configuration, ShiftRecord captures runtime details such as actual start/end times, status, duration, and location.

Table Structure

The following table outlines the SQL columns for the shift_records table, providing a brief description of each, along with sample data where applicable.

ColumnTypeDescriptionExample
idString (ULID)Unique identifier for the entity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIf the entity is enabled or not.true
created_dateDateTimeDate the entity was created.2024-12-31T19:48:44Z
created_byStringPerson who created the entity.TamakiMES
modified_dateDateTimeDate the entity was modified. Value is null on creation; populated on first edit.2024-12-31T19:48:44Z
modified_byStringLast person to modify the entity. Value is null on creation; populated on first edit.TamakiMES
notesBlobNotes about the entity.This entity has these notes
spare1StringThe first spare column that can be used for additional context on the entity.some extra context 1
spare2StringThe second spare column that can be used for additional context on the entity.some extra context 2
spare3StringThe third spare column that can be used for additional context on the entity.some extra context 3
start_dateDateTimeActual start date/time when the shift began.2024-12-31T06:00:00Z
end_dateDateTimeActual end date/time when the shift ended.2024-12-31T14:00:00Z
statusString (Enum)Current status of the record: IDLE, ACTIVE, CLOSED, VERIFIED.ACTIVE
durationDoubleDuration of the shift record in seconds.28800
location_idString (ULID)Reference to the location where this record applies. See locations.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
shift_idString (ULID)Reference to the shift configuration that created this record. See shifts.01JAP8RJBN-8ZTPXSGY-J9GSDPE1

Field Details

start_date and end_date

Record the actual start and end times of the shift occurrence.

status

Indicates the current state of the record:

  • IDLE: Created but not started
  • ACTIVE: Currently in progress
  • CLOSED: Ended
  • VERIFIED: Reviewed and verified

duration

Total time of the shift record in seconds; updated as the record progresses and finalized at end.

location_id

References the location where the shift ran.

shift_id

References the Shift that defines the configuration for this record.