Skip to main content

Payroll Persistence Object Reference

Summary

Public-safe reference for all objects mapped by PayrollDbContext.

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

Provide a complete logical object inventory without physical schema definitions, SQL, or sensitive data.

Ownership

One PayrollDbContext exposes 19 DbSets.

Lifecycle

The object inventory reflects the current model snapshot after all four migrations.

Persisted fields

ObjectHigh-level purposePrimary keyExplicit index profile
PayrollPeriodTenant payroll period lifecycleIdUnique tenant/period
PayrollRunPeriod calculation aggregateIdTenant/period/status
PayrollRunDetailEmployee outcome per runIdUnique tenant/run/employee
SalaryCalculationCalculation evidence/payloadIdTenant/run/employee
PayslipStructured employee payslipIdUnique tenant/run/employee
PayrollAdjustmentPeriod employee adjustmentIdTenant/employee/period
AdvanceSummaryCurrent employee advance summaryIdUnique tenant/employee
AdvanceTransactionAdvance/recovery ledger entryIdTenant/employee/date; tenant/run/type
OvertimeEntryDated employee overtime inputIdTenant/employee/date
SalaryComponentTenant/employee calculation componentIdTenant/name/employee
StatutorySettingTenant statutory component settingIdUnique tenant/component
PayrollAuditLogOperation evidenceIdTenant/occurrence time
PayrollTimelineEmployee/run chronologyIdTenant/employee/occurrence time
EmployeePayrollProfilePayroll workforce projectionIdUnique tenant/legacy employee; tenant/employee
AttendancePayrollSnapshotEmployee-period attendance projectionIdUnique tenant/employee/period
LeavePayrollSnapshotEmployee-period leave projectionIdUnique tenant/employee/period
ApprovedExpenseSnapshotApproved-expense projectionIdUnique tenant/claim; tenant/employee/period
ProcessedIntegrationEventInbound idempotency markerEventIdTenant/event type/occurrence time
OutboxMessageOutbound publication intentIdUnique event identity; status/occurrence time

Relationships

Logical references exist among period, run, detail, calculation, payslip, employee, timeline, advance reversal, and projection records. EF defines zero relationships and zero foreign keys.

Constraints

There are 19 primary keys and 10 unique indexes. Required strings, maximum lengths, structured payload mappings, and fixed-precision numeric mappings are selectively configured.

Indexes

There are 23 explicit secondary indexes: 10 unique and 13 non-unique. No foreign-key index exists.

Tenant behavior

Seventeen objects use the global filter. ProcessedIntegrationEvent and OutboxMessage carry tenant metadata without that filter.

Audit behavior

PayrollAuditLog, PayrollTimeline, ProcessedIntegrationEvent, and OutboxMessage have distinct evidence/integration roles.

Integration usage

Workforce, attendance, leave, and expense objects are local projections. Processed-event and outbox objects support inbound/outbound integration reliability.

Known limitations

This is a logical reference, not a DDL contract. No owned type, persisted value object, delete behavior, or concurrency token is configured.

Requires confirmation

  • Data classification, retention, archival, and purge policy for every object.
  • Whether referential constraints will be introduced in a future model.

Source References

  • microservices/src/payroll-service/Infrastructure/PayrollDbContext.cs
  • microservices/src/payroll-service/Domain/PayrollEntities.cs
  • microservices/src/payroll-service/Infrastructure/Migrations/PayrollDbContextModelSnapshot.cs

See Also

Keywords

  • Payroll database
  • Payroll Persistence Object Reference
  • Payroll persistence

Revision Information

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