Peer Mentor Location Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
Data access layer responsible for reading and writing lat/lng coordinates stored in the peer_mentors table. Provides filtered queries to fetch mentors within a geographic bounding box and exposes update operations to persist coordinates when a mentor's address changes during profile creation or edit.
peer-mentor-location-repository
Responsibilities
- Fetch peer mentors with populated lat/lng coordinates for the coordinator's association
- Query mentors within a geographic bounding box
- Update mentor coordinates when address is changed
- Return mentors missing coordinates for geocoding backfill
Interfaces
getMentorsWithCoordinates(String associationId) -> Future<List<PeerMentor>>
getMentorsInBounds(LatLngBounds bounds) -> Future<List<PeerMentor>>
updateCoordinates(String mentorId, double lat, double lng) -> Future<void>
getMentorsMissingCoordinates(String associationId) -> Future<List<PeerMentor>>
getMentorById(String mentorId) -> Future<PeerMentor?>
Relationships
Related Data Entities (2)
Data entities managed by this component