-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Phase 2: Foundational
Task: T009
Status: Not Started
Story: Foundational (blocking all user stories)
Parallelizable: Yes - independent from T007-T008, T010
Description
Create CertificateAuditLog immutable event log entity for all certificate lifecycle events.
Acceptance Criteria
- File created: api/CourseRegistration.Domain/Entities/CertificateAuditLog.cs
- All 8+ properties implemented (see data-model.md):
- AuditLogId (Guid, PK)
- CertificateId (Guid, FK)
- EventType (enum: Issued, Revoked, Verified, Expired)
- AdminUserId (int, FK, nullable)
- EventTimestamp (datetime2, UTC)
- Reason (string, nullable, for revocation reason)
- EventDetails (string JSON, for extensibility)
- IsDeleted (bit, soft delete)
- CreatedUtc (datetime2)
- Immutability enforced: Property setters private or init-only
- EventType enum defined with all 4 event types
- Insert-only pattern: no modification/deletion allowed in domain logic
- XML documentation on public members
Effort Estimate
2.5 hours
References
- data-model.md: CertificateAuditLog Entity section
- research.md: Audit logging patterns
Reactions are currently unavailable