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
| Boundary | Leave persistence responsibility | External responsibility | Source |
|---|---|---|---|
| Employee | Local read model and legacy identity bridge | Employee master record | microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs |
| Attendance | No Attendance table or decision ownership | Conflict decisions and weekly-off overlap | microservices/src/leave-service/Application/LeaveWorkflows.cs |
| Payroll | Leave balance state only | Payroll calculation and processing | microservices/src/leave-service/Infrastructure/LeaveDbContext.cs |
| Workflow | Request correlation identifier | Workflow instance and task state | microservices/src/leave-service/Domain/Leave/LeaveRequest.cs |
| Monolith | Extracted schema and compatibility contracts | Legacy objects remain separate during transition | Data/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
Related Articles
See Also
Keywords
- Data ownership
- Service boundary
- Read model
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly