Attendance Policy Storage
Summary
Attendance policies persist tenant-level calculation configuration and own ordered rule rows. Customer-specific numeric values are intentionally omitted.
Audience
- Backend developers, Time Office implementers, QA engineers, and architects
Reference Content
Model
A policy stores tenant identity, name, standard-hours and threshold categories, lateness grace, overtime category, shortfall enablement, default and active flags, and timestamps. Rules store a tenant, parent policy identifier, key, type, comparison category, threshold, result status, sequence, and active flag.
The database enforces at most one default policy per tenant through a filtered unique index. It also enforces one rule key per policy and a required policy-to-rule foreign key with cascade delete. Active-policy lookup has a tenant/active index.
The aggregate replaces its rule collection as an owned set. Employee-specific policy assignment is Not implemented. Current resolution can use an active tenant default policy; policy-driven calculation maturity is Foundation / Transitional and must be verified against the calculator before treating stored settings as universally effective.
Source References
microservices/src/attendance-service/Domain/TimeOffice/AttendancePolicy.csmicroservices/src/attendance-service/Domain/TimeOffice/AttendancePolicyRule.csmicroservices/src/attendance-service/Infrastructure/AttendanceDbContext.csmicroservices/src/attendance-service/Application/Services/AttendancePolicyResolver.cs
Related Articles
See Also
Keywords
- Attendance persistence
- EF Core
- PostgreSQL
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly