Skip to main content

Employee Profile Storage

Summary

EmployeeProfiles is a Leave-local read model maintained from Employee integration events; it is not the employee master record.

Audience

Backend developers, QA, architects, integration owners, and support engineers.

Reference Content

The composite primary key is tenant + labor identifier. Additional non-unique indexes support tenant/user and tenant/external employee identity. Stored projection fields include cross-system identifiers, active/status and joining-date data, manager/organization display context, contact/display fields, last-event identity/time, and update time. Personal field values are intentionally not reproduced here.

The consumer bypasses global filters only while explicitly matching tenant plus identity. It detects an identical last event and ignores events older than the recorded occurrence time. The last-event fields provide projection-specific idempotency/staleness handling; there is no general inbox ledger. Failures are requeued after the database operation fails. No deletion event handling or deletion propagation was confirmed; employment-status events can mark a profile inactive.

Source References

  • microservices/src/leave-service/Domain/Leave/EmployeeProfile.cs
  • microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • microservices/src/leave-service/Infrastructure/Migrations/20260703060858_AddEmployeeProfileSyncFields.cs

See Also

Keywords

  • Employee projection
  • Event synchronization
  • Idempotency

Revision Information

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