Payroll Domain Model
Summary
The current Payroll domain is represented by mutable entities and persisted calculation records, with lifecycle behavior implemented primarily in application services.
Audience
Backend and frontend developers, QA and DevOps engineers, support and security engineers, and solution architects.
Overview
The current Payroll domain is represented by mutable entities and persisted calculation records, with lifecycle behavior implemented primarily in application services.
Technical Detail
Model groups
Core records include periods, runs, employee run details, calculation snapshots, payslips, adjustments, salary components, statutory settings, advance summaries and transactions, overtime entries, audit/timeline records, workforce projections, input projections, processed-event markers, and outbox records.
Aggregate and event behavior
PayrollRun is treated as the lifecycle center, but it is a data entity rather than a behavior-rich aggregate root. Calculation, freeze, unfreeze, invariant checks, audit creation, and integration-event creation occur in application services. Contract events are persisted through the outbox.
Value objects and enums
No Payroll-specific value-object types or C# enums are confirmed. Statuses and categories are stored as strings. This makes vocabulary governance a current technical concern.
Persistence boundary
Mappings, numeric precision, unique indexes, JSON breakdowns, and tenant filters are infrastructure concerns and are intentionally not reproduced as database documentation.
Source References
microservices/src/payroll-service/Domain/PayrollEntities.csmicroservices/src/payroll-service/Application/PayrollCalculationService.csmicroservices/src/payroll-service/Infrastructure/PayrollDbContext.cs
Related Articles
See Also
Keywords
- Payroll Service
- Payroll Domain Model
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly