Payroll Workforce Storage
Summary
Local workforce projection used by Payroll calculation and output paths.
Audience
Payroll developers, QA and support engineers, solution and security architects, and implementation partners.
Reference Content
The sections below describe the confirmed logical storage contract and its implementation boundaries.
Purpose
Describe EmployeePayrollProfile as a Payroll-owned projection of upstream workforce and compensation inputs.
Ownership
Payroll owns the projection record; upstream employee sources remain authoritative for workforce facts.
Lifecycle
Inbound employee events upsert the projection with last-event markers. Backfill and development seeding can also populate it. Calculation reads eligible profiles; it does not query the upstream employee store in the same EF transaction.
Persisted fields
High-level groups include tenant and employee identifiers, employment/organization descriptors, contact attributes, employment status, compensation and work-schedule inputs, payment-routing attributes, activity state, last-event markers, and update time. Sensitive values are deliberately not enumerated.
Relationships
Employee identifiers logically align profiles with run details, projections, adjustments, advances, overtime, components, payslips, and timeline records. No foreign keys enforce those links.
Constraints
Legacy employee identity is unique within a tenant. The newer employee identifier is indexed but not unique.
Indexes
A unique tenant/legacy-employee index and a non-unique tenant/employee index support compatibility and extracted-service lookup.
Tenant behavior
The projection has a global tenant filter. Consumer/backfill operations can bypass it while applying explicit tenant predicates.
Audit behavior
Inbound synchronization writes Payroll audit evidence; backfill completion is separately audited.
Integration usage
The event consumer uses duplicate and stale-event guards. The backfill source is read-only and target writes are batched.
Known limitations
Two employee identifier forms coexist. Projection freshness depends on event delivery or controlled backfill.
Requires confirmation
- Final identifier migration and compatibility retirement.
- Data minimization, masking, retention, and access rules for sensitive profile attributes.
Source References
microservices/src/payroll-service/Infrastructure/PayrollDbContext.csmicroservices/src/payroll-service/Domain/PayrollEntities.csmicroservices/src/payroll-service/Infrastructure/Migrations/PayrollDbContextModelSnapshot.csmicroservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/payroll-service/Backfill/EmployeeProfileBackfill.cs
Related Articles
See Also
Keywords
- Payroll database
- Payroll Workforce Storage
- Payroll persistence
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly