Attendance Domain Model
Summary
The domain contains aggregate roots for mutable attendance and Time Office behaviors plus supporting read and snapshot models.
Audience
Backend developers, architects, and QA engineers.
Model inventory
Aggregate-root types include AttendanceRecord, AttendancePunchRecord, AttendanceReopenRequest, Shift, WeeklyOffRule, AttendancePolicy, and EmployeeShiftAssignment. AttendancePolicyRule is an entity owned by AttendancePolicy. EmployeeProfile, EmployeeAttendancePolicy, EffectiveAttendancePolicy, and PayrollApprovedSnapshot support calculation or integration boundaries rather than representing the employee or payroll master domain.
No explicit value-object classes are present; dates, times, hours, identifiers, and status values use framework or primitive types. Status vocabularies are constants rather than language enums, while Time Office comparison/day concepts include enum-like types. AttendanceCalculator is a stateless domain service.
Aggregate methods enforce required tenant/employee context, non-negative canonical values, state transitions, active/default constraints, effective ranges, and overlap-related rules coordinated by application services. Attendance domain events represent punched, submitted, approved, rejected, and reopened outcomes. Audit and human-readable timeline records are infrastructure/application concerns persisted with supported mutations; they are not aggregate collections.
Repository interfaces establish consistency access boundaries, while one unit-of-work commit persists aggregate changes, audit/timeline rows, and mapped outbox messages.
Source References
microservices/src/attendance-service/Domain/Common/DomainPrimitives.csmicroservices/src/attendance-service/Domain/Attendance/AttendanceRecord.csmicroservices/src/attendance-service/Domain/Attendance/AttendancePunchRecord.csmicroservices/src/attendance-service/Domain/Attendance/AttendanceReopenRequest.csmicroservices/src/attendance-service/Domain/Attendance/AttendanceDomainEvents.csmicroservices/src/attendance-service/Domain/TimeOffice/AttendancePolicy.cs
Related Articles
See Also
Keywords
- Attendance Service
- Attendance Domain Model
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly