Expense Schema Reference
Summary
The catalog contains the six objects mapped by the current Expense EF model. Owned claim values are included with their aggregate rather than presented as independent objects.
Audience
Backend developers, database reviewers, QA, architects, DevOps, support, and implementation teams.
Confirmed persistence
| Persisted object | Purpose and ownership | Relationships | Indexes | Query filter | Status |
|---|---|---|---|---|---|
| ExpenseClaim | Aggregate state; owns claimant, category, and money values | Parent navigation to receipt references; no cross-service FKs | Primary key; unique CompatId; TenantId + Status; WorkflowInstanceId | Tenant predicate with privileged bypass | Confirmed |
| ExpenseReceiptReference | Expense-owned metadata pointing to externally managed receipt content | Required ExpenseClaimId FK; cascade on claim deletion | Primary key; ExpenseClaimId; TenantId + ExpenseClaimId | Tenant predicate with privileged bypass | Confirmed |
| ExpenseAuditLog | Expense mutation evidence | EntityType and EntityId are logical identifiers; no claim FK | Primary key; TenantId + OccurredAtUtc | Tenant predicate with privileged bypass | Confirmed |
| ExpenseTimeline | Expense lifecycle activity evidence | EntityType and EntityId are logical identifiers; no claim FK | Primary key; TenantId + OccurredAtUtc | Tenant predicate with privileged bypass | Confirmed |
| OutboxMessage | Durable outbound integration intent owned operationally by Expense | Logical event correlation only; no claim FK | Primary key; unique EventId; Status + OccurredAtUtc | None configured | Confirmed |
| ProcessedIntegrationEvent | Inbound integration idempotency ledger | Logical event correlation only; no claim FK | Primary key; unique EventId | None configured | Confirmed but no current subscriber use confirmed |
Money, ExpenseCategory, and ExpenseClaimant are owned claim values rather than separate persisted objects. ExpensePolicy, ExpenseLimit, ClaimItem, CostCenter, PaymentBatch, and ReimbursementSchedule are Not implemented.
Requires confirmation
Production migration governance, retention, archival, masking, performance targets, concurrency roadmap, operational-store access, and rollback ownership remain unconfirmed unless narrowed above.
Source References
microservices/src/expense-service/Infrastructure/ExpenseDbContext.cs
Related Articles
See Also
Keywords
- Expense database
- Schema Reference
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly