Skip to main content

Payslip Storage

Summary

Persistence boundaries for structured payslips and generated documents.

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 durable payslip metadata/payload storage and the boundary to rendered documents.

Ownership

Payroll Service owns Payslip records. Generated document bytes are produced in memory by the output path; no external document repository write is confirmed.

Lifecycle

Structured generation creates or replaces the tenant/run/employee payslip record, adds audit and outbox intent, and saves. PDF rendering reads payroll data and occurs after the structured save boundary when invoked by that path.

Persisted fields

The record stores identity, tenant, run/employee references, status, structured payload, and creation time. Payload content and payroll values are intentionally not published.

Relationships

Run and employee references are not database foreign keys.

Constraints

A unique tenant/run/employee index permits one persisted payslip per employee outcome.

Indexes

The unique composite index is the only explicit payslip index.

Tenant behavior

Payslip has a global tenant filter; output queries that bypass filters explicitly constrain tenant.

Audit behavior

Structured generation stages a Payroll audit record in its local save. Rendering failures after that save do not roll back the persisted payslip.

Integration usage

Payslip-generation intent is written to the outbox with the payslip. External notification and broker publication are outside the EF transaction.

Known limitations

No persisted document-version history or external document storage integration is confirmed.

Requires confirmation

  • Document retention, regeneration, immutability, and access policies.
  • Automatic downstream handling of payslip outbox events.

Source References

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

See Also

Keywords

  • Payroll database
  • Payslip Storage
  • Payroll persistence

Revision Information

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