Data Layer low complexity backend
0
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Data access layer for the delegation_grants table, providing read and write operations for all proxy and bulk submission audit records. Enables coordinators, admins, and auditors to query which activities were submitted on behalf of which peer mentors and by whom.

Feature: Bulk Registration & Proxy Reporting

delegation-repository

Responsibilities

  • Insert delegation_grants records with coordinator, mentor, activity, and timestamp
  • Query delegation history by coordinator ID for audit views
  • Query delegations received by a specific peer mentor
  • Support Supabase RLS policies that restrict grant creation to coordinator and admin roles

Interfaces

createGrant(coordinatorId, mentorId, activityId)
getGrantsByCoordinator(coordinatorId)
getGrantsByMentor(mentorId)
getGrantById(grantId)
deleteGrant(grantId)
listGrantsForOrganization(orgId)

Related Data Entities (3)

Data entities managed by this component