Peer Mentor Status Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
3
Dependents
2
Entities
0
Integrations
Description
Data access layer for reading and writing peer mentor status log entries in the peer_mentor_status_logs table. Provides typed query methods for retrieving the latest status, full history, and filtered queries used by the certification expiry background job.
peer-mentor-status-repository
Responsibilities
- Insert new status log entries with status enum, reason, and return_date
- Query latest status log entry for a given mentor
- Retrieve full status history ordered by creation time
- Query all mentors with upcoming or past certification expiry dates
- Update peer_mentors table is_visible flag for roster hiding on pause
Interfaces
insertStatusLog(entry: StatusLogEntry): Future<void>
getLatestStatus(mentorId: String): Future<StatusLogEntry?>
getStatusHistory(mentorId: String): Future<List<StatusLogEntry>>
getMentorsWithExpiredCertifications(asOf: DateTime): Future<List<String>>
updateMentorVisibility(mentorId: String, isVisible: bool): Future<void>
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (2)
Data entities managed by this component