Leave Audit and Timeline Storage
Summary
AuditLogs stores technical action evidence; LeaveTimeline stores employee-oriented business history. Both are tenant-filtered append-style records without database foreign keys.
Audience
Backend developers, QA, architects, audit reviewers, and support engineers.
Reference Content
| Store | Purpose | Key fields | Index | Retrieval | Source |
|---|---|---|---|---|---|
| AuditLogs | Technical action/category and diagnostic detail | GUID, entity type/id, action, actor, optional structured detail, occurrence time | tenant/time | No public Leave audit query confirmed | microservices/src/leave-service/Infrastructure/LeaveDbContext.cs |
| LeaveTimeline | Business/employee history | Integer ID, labor, optional request, entry type, detail, actor, occurrence time | tenant/labor/time | Newest first, optional labor, capped result | microservices/src/leave-service/Application/LeaveWorkflows.cs |
Actor and correlation are stored as application-provided text/identifiers; no separate correlation column exists on either history table. Timeline request identity and audit entity identity are logical references, not foreign keys. The source does not configure database immutability: append-only behavior is a code convention. Audit and timeline participate atomically when added before the same SaveChanges call; later balance effects can create a second history commit.
Source References
- microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
- microservices/src/leave-service/Infrastructure/Persistence.cs
- microservices/src/leave-service/Domain/Leave/LeaveExtras.cs
- microservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Audit log
- Leave timeline
- History
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly