Skip to main content

Entity Mappings

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

Mappings are configured inline in each context rather than through separate entity-configuration classes.

Required and optional fields

Canonical names and policy rule descriptors are required and bounded. Assignment end date and related user reference are optional. Policy rules require parent reference. Legacy tenant fields are optional, while canonical and Leave tenant fields are non-nullable.

Precision and generated values

Canonical policy and shift hour values use fixed numeric precision. Canonical keys are generated; compatibility identity is generated in runtime and supplied by backfill. Audit/timeline use generated unique identifiers and timestamps.

Ignored properties

Domain-event collections are ignored for canonical shift-policy aggregates. Shift scheduled duration is calculated and not stored.

Defaults

Domain creation supplies activation state and timestamps. Mapping-level defaults are limited; most defaults reside in domain constructors, property initializers, migrations, or seeders.

Configuration boundary

No standalone mapping classes were found. Model snapshots provide generated representations of Attendance and Leave mappings.

Source References

  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • Data/AppDbContext.cs

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