Attendance Record Storage
Summary
AttendanceRecord stores a tenant-scoped employee outcome for a calendar date, including calculated time, paid units, workflow state, and approval metadata.
Audience
- Backend developers, QA engineers, payroll integrators, and support engineers
Reference Content
Conceptual model
Stored concepts
The object stores status, work hours, overtime, deduction/shortfall hours, late minutes, paid units, a payroll note, approval state, and approver text. Submission and approval timestamps are not fields on this object; corresponding history can appear through domain-event outbox records and explicit audit/timeline writes.
The repository resolves employee/date records by descending surrogate identifier. The configured employee/date index is non-unique. Therefore “one record per tenant, employee, and date” is an application-only invariant, not a database uniqueness constraint.
There are no modeled foreign keys from punches or reopen requests to this object. Their relationships are logical through tenant, employee, date, and optional Attendance identifier. Reopen approval can update or create the daily record; the request then stores the resulting identifier.
Source References
microservices/src/attendance-service/Domain/Attendance/AttendanceRecord.csmicroservices/src/attendance-service/Infrastructure/AttendanceDbContext.csmicroservices/src/attendance-service/Infrastructure/Persistence.csmicroservices/src/attendance-service/Application/Services/AttendanceCommands.cs
Related Articles
See Also
Keywords
- Attendance persistence
- EF Core
- PostgreSQL
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly