Leave Request Aggregate
Summary
LeaveRequest owns identity, tenant/employee references, calculated duration, status transitions, Workflow linkage, and domain-event creation.
Audience
Backend developers, QA, architects, and technical support.
Overview
The aggregate retains Leave type text, date range, server-calculated days, optional reason, rejection reason, decision actor/time, creator/time, and optional Workflow instance identity. It raises requested and terminal decision domain events.
Balance effects are deliberately outside the aggregate because application code resolves employee-to-user context. Timeline/audit entries are also application concerns. A save commits aggregate state and queued outbox data for that save; subsequent balance or external Workflow work uses additional boundaries. No distributed transaction is present.
Source References
microservices/src/leave-service/Domain/Leave/LeaveRequest.csmicroservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Leave Service
- Leave Request Aggregate
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly