Shift Storage
Audience
Developers, database engineers, QA engineers, support engineers, security engineers, solution architects, and implementation partners.
Reference Content
This page records source-verified Workforce Scheduling persistence behavior and boundaries.
Summary
The canonical Shift aggregate stores tenant ownership, compatibility identity, name, time window, grace, standard hours, overtime threshold, night classification, active state, and timestamps.
Canonical mapping
The canonical key is generated. Compatibility identity is generated during ordinary API writes and explicitly supplied by the backfill context. Compatibility identity is uniquely indexed. Name is required and bounded. Standard and overtime hours use fixed numeric precision. Scheduled duration and domain events are not persisted.
A tenant/active-state index supports lists. Every query is tenant filtered unless privileged context bypasses the filter. Name uniqueness is application-enforced, not database-enforced.
Lifecycle and audit
Create and update persist active configuration. Delete is soft deactivation. Scheduling commands write audit and timeline rows, usually after an initial save that obtains generated identity.
Legacy mapping
The legacy Shift is a simpler tenant-filtered entity with string times and textual overtime rules. Legacy employees can reference it through a nullable relationship whose delete behavior clears the reference. Explicit shift-specific indexes or constraints were not found in the monolith fluent configuration.
Source References
microservices/src/attendance-service/Domain/TimeOffice/Shift.csmicroservices/src/attendance-service/Infrastructure/AttendanceDbContext.csModels/Shift.csData/AppDbContext.cs
Related Articles
See Also
Keywords
- Workforce Scheduling database
- Shift persistence
- Attendance policy storage
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20