Pause Management Service
Component Detail
Service Layer
medium complexity
backendmobile
0
Dependencies
0
Dependents
3
Entities
0
Integrations
Description
Core business logic service managing availability status transitions for peer mentors. Validates allowed state transitions (active → paused, paused → active, certificate-expired → paused), writes the new status to the availability repository, and triggers coordinator notifications on every status change. Enforces RLS policies so mentors can only update their own record while coordinators can update any mentor in their organisation.
pause-management-service
Responsibilities
- Validate and apply availability status transitions
- Persist status changes via availability repository
- Trigger coordinator notifications on status change
- Enforce RLS-aligned authorization rules
Interfaces
pauseMentor(mentorId, reason?, resumeDate?)
resumeMentor(mentorId)
getAvailabilityStatus(mentorId)
getAvailabilityHistory(mentorId)
updateResumeDate(mentorId, date)
pauseOnCertificateExpiry(mentorId)
getActiveMentors(organisationId)
getPausedMentors(organisationId)
Related Data Entities (3)
Data entities managed by this component