Skip to main content

Leave Data Ownership and Boundaries

Summary

Leave Service owns Leave state, while references to Employee, Attendance, Payroll, and Workflow remain cross-service identities rather than shared-table relationships.

Audience

Backend developers, architects, QA, DevOps, and integration owners.

Concept

BoundaryLeave persistence responsibilityExternal responsibilitySource
EmployeeLocal read model and legacy identity bridgeEmployee master recordmicroservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
AttendanceNo Attendance table or decision ownershipConflict decisions and weekly-off overlapmicroservices/src/leave-service/Application/LeaveWorkflows.cs
PayrollLeave balance state onlyPayroll calculation and processingmicroservices/src/leave-service/Infrastructure/LeaveDbContext.cs
WorkflowRequest correlation identifierWorkflow instance and task statemicroservices/src/leave-service/Domain/Leave/LeaveRequest.cs
MonolithExtracted schema and compatibility contractsLegacy objects remain separate during transitionData/AppDbContext.cs

The model contains no foreign keys to other services and no shared-table contract. EmployeeProfile is a read model, not Employee master data. Carry-forward and encashment records are Leave-owned Foundation objects. Compatibility does not prove data synchronization, reconciliation, or a completed cutover path.

Source References

  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
  • microservices/src/leave-service/Application/LeaveWorkflows.cs
  • microservices/src/leave-service/Domain/Leave/LeaveRequest.cs
  • Data/AppDbContext.cs

See Also

Keywords

  • Data ownership
  • Service boundary
  • Read model

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly