tbl_shiftgroup_history

-1 rows


Description

Module: Attendance - Shift Group Assignment History
Purpose: Stores an immutable, historical record of changes to the composition of Shift Groups. It logs the assignment of individual shifts (from tbl_ShiftMasterV1) to master shift groups.
Data: Captures the unique ID of the specific shift, the ID of the shift group it was assigned to, and a reference ID to the master shift’s configuration history (ShiftMasterV1HistoryId) for contextual auditing.
Process Usage:
- Auditing: Provides a complete timeline of how shift group definitions have changed over time, which is critical for retrospective analysis of attendance rules.
- Compliance: Used to verify which shift rules were active for an employee on a specific date based on their assigned shift group.
Key Points:
- Mapping History: Tracks the many-to-many relationship changes between Shift Master and Shift Group Master tables.
- The AbstractAuditingEntity parent class captures the user and time of the change.
Business Impact: Ensures controlled, traceable, and compliant management of shift scheduling and attendance rules.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('tbl_shiftgroup_history_id_seq'::regclass)

Primary key
Format: Long (auto-increment)
Used as: Unique identifier for this specific historical record of a shift assignment change.

shiftid int8 19 null
tbl_shiftmasterv1.shiftid Implied Constraint R

FK: public.tbl_ShiftMasterV1.Id (Implied)
Meaning: The ID of the specific shift that was involved in the group assignment change.

shiftgroupid int8 19 null

FK: public.tbl_ShiftGroup.Id (Implied)
Meaning: The ID of the shift group to which the shift was assigned/unassigned in this record.

shiftmasterv1historyid int8 19 null

FK: public.tbl_ShiftMasterV1History.Id (Implied)
Meaning: A reference ID to the corresponding history record of the shift definition itself at the time of this assignment change, providing complete context.

createdby varchar 50 null
createddate timestamp 29,6 null
modifiedby varchar 50 null
modifieddate timestamp 29,6 null

Indexes

Constraint Name Type Sort Column(s)
tbl_shiftgroup_history_pk_tbl_shiftgroup_history Primary key Asc id

Relationships