tbl_shiftmasterv1

4 rows


Description

Module: HRMS Time & Attendance (Shift Management)
Purpose: Stores the foundational configuration and parameters for all standard and custom work shifts used across the organization.
Data: Defines shift timings, duration, grace periods, and rules for attendance processing.
Process Usage:
- Referenced by the attendance processor to validate employee punches (late-in/early-out) and calculate total working hours.
- Used by scheduling and employee profile management modules to assign shifts.
Key Points:
- Version 1 of the shift master, indicating a potential for future schema evolution.
- Critical for payroll accuracy and labor law compliance.
Business Impact: Ensures consistent application of work hours and attendance rules across the workforce.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
shiftid bigserial 19 nextval('tbl_shiftmasterv1_shiftid_seq'::regclass)
tbl_attendance_workschedule_detail.shiftid Implied Constraint R
tbl_attendance_workschedule_detail_history.shiftid Implied Constraint R
tbl_dailyattendancen.shiftid Implied Constraint R
tbl_shiftgroup.shiftid Implied Constraint R
tbl_shiftgroup_history.shiftid Implied Constraint R
tbl_shiftmasterv1history.shiftid Implied Constraint R
tbl_workscheduleallocation_history.shiftid Implied Constraint R

Primary key
Format: Integer (auto-increment)
Used as: Unique identifier for a single shift record.

shiftname varchar 100 null

The user-friendly name of the shift (e.g., “General Day Shift,” “Night Production Shift”).
Format: Varchar/Text.

shiftcolor varchar 50 null

A color code (e.g., HEX code) used for visual representation of the shift on schedules or dashboards.
Format: Varchar.

stage varchar 30 null

The current lifecycle status of the shift configuration (e.g., Draft, Active, Archived).
Format: Varchar/Text.

nextdayend bool 1 null

Flag indicating if the shift end time extends into the next calendar day (e.g., a night shift starting at 10 PM and ending at 6 AM).
Format: Boolean.

starttime time 15,6 null

The scheduled start time of the shift.
Format: Time.

endtime time 15,6 null

The scheduled end time of the shift.
Format: Time.

duration varchar 50 null

The total scheduled duration of the shift in hours and minutes, including breaks.
Format: Time/Interval.

tolerancestart numeric 0 null

The allowed buffer or grace time before the shift start time during which a punch-in is considered “On Time.”
Format: Time/Interval.

toleranceend numeric 0 null

The allowed buffer or grace time after the shift end time during which a punch-out is considered “On Time.”
Format: Time/Interval.

buffertime int8 19 null

General buffer time or total non-working grace period allocated for the shift.
Format: Time/Interval.

fulldayhours numeric 0 null

The minimum working hours required to qualify for a “Full Day” of attendance.
Format: Time/Interval.

halfdayhours numeric 0 null

The minimum working hours required to qualify for a “Half Day” of attendance.
Format: Time/Interval.

shiftgroup bool 1 false

FK: Reference to a shift group master table
Meaning: Groups similar shifts together for easy scheduling and policy application.
Format: Varchar/Text.

description varchar 1000 null

Detailed description or notes about the shift, including break times or specific rules.
Format: Text.

createdby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The user who created this shift record.

createddate timestamp 29,6 null

Timestamp of when the shift record was created.
Format: Timestamp with timezone.

modifiedby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The last user who modified the shift record.

modifieddate timestamp 29,6 null

Timestamp of the last modification to the shift record.
Format: Timestamp with timezone.

Indexes

Constraint Name Type Sort Column(s)
tbl_shiftmasterv1_pk__tbl_shif__c0a8388128c631ef Primary key Asc shiftid

Relationships