Shift Domain
Audience
Developers, QA engineers, support engineers, security engineers, solution architects, and implementation partners.
Reference Content
This page records source-verified technical behavior and boundaries for the workforce-scheduling capability.
Summary
A shift records tenant ownership, display name, start and end times, grace minutes, standard daily hours, overtime threshold, night-shift classification, compatibility identity, activation state, and timestamps.
Invariants
- Tenant identity must be positive and name must be present.
- Start and end cannot be equal.
- Grace must remain within a full-day bound.
- Standard hours must be positive and no more than one day.
- The overtime threshold must remain within a day.
- A window ending at or before its start is treated as crossing midnight unless an explicit night classification is supplied.
Scheduled duration is calculated across midnight when necessary. Wire helpers accept culture-independent minute or second precision and emit a canonical minute format.
Lifecycle
Create always produces an active shift. Update changes calculation and display state. Deactivate is a soft delete and activate restores availability. The direct application service prevents deactivation while active assignments exist; the compatibility service instead deactivates those assignments as part of legacy delete behavior.
Consistency boundary
Case-insensitive name uniqueness is checked in application code, not by a database constraint. Concurrent writers can therefore race.
Source References
microservices/src/attendance-service/Domain/TimeOffice/Shift.csmicroservices/src/attendance-service/Application/TimeOffice/ShiftPolicyMappings.cs
Related Articles
See Also
Keywords
- Workforce scheduling
- Shift policy
- Attendance integration
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20