Pause Mentor Service
Component Detail
Service Layer
medium complexity
backend
2
Dependencies
2
Dependents
4
Entities
0
Integrations
Description
Core business logic service that orchestrates the full pause and resume lifecycle for a peer mentor. Exposes pauseMentor() and resumeMentor() methods that write status log entries, validate state transitions, and trigger downstream notifications to the coordinator via the Push Notification Service.
pause-mentor-service
Responsibilities
- Validate that a status transition is legal before persisting
- Write new peer_mentor_status_logs entry with status, reason, and return date
- Invoke Pause Notification Service after every status change
- Expose current status resolution logic (latest log entry wins)
- Handle certification-expiry-triggered automatic pause creation
Interfaces
pauseMentor(mentorId: String, reason: String, returnDate: DateTime?): Future<void>
resumeMentor(mentorId: String): Future<void>
getCurrentStatus(mentorId: String): Future<MentorStatus>
getStatusHistory(mentorId: String): Future<List<StatusLogEntry>>
handleCertificationExpiry(mentorId: String, expiryDate: DateTime): Future<void>
Relationships
Dependencies (2)
Components this component depends on
Dependents (2)
Components that depend on this component
Related Data Entities (4)
Data entities managed by this component