Certifications Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Data access layer for the certifications table, providing CRUD operations for certificate records linked to users and organizations. Exposes query methods for expiry window scans and active status lookups used by both the Certificate Service and the Expiry Scheduler.
certifications-repository
Responsibilities
- Create and persist new certificate records with signed metadata
- Retrieve certificate by user and organization
- Query certificates expiring within a configurable day window
- Update certificate status (active, expired, revoked)
Interfaces
create(certificate: CreateCertificateDto): Certificate
findByUser(userId: string): Certificate | null
findExpiring(withinDays: number): Certificate[]
updateStatus(certificationId: string, status: CertificateStatus): void
findActiveByOrganization(organizationId: string): Certificate[]
Related Data Entities (2)
Data entities managed by this component