Data Layer medium complexity backend
0
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

Data access layer handling all read queries for team reporting. Implements paginated SQL queries with dynamic filter composition for date ranges, activity types, coordinators, and local associations. Returns structured result sets suitable for aggregation by the Report Generation Service.

Feature: Team Reports

reports-repository

Responsibilities

  • Execute paginated GROUP BY queries for activity aggregation by coordinator and association
  • Apply dynamic filter clauses for date range, activity type, coordinator, and local association
  • Enforce organization-level tenant isolation in all queries
  • Return participation counts, total hours, and activity type breakdowns per grouping

Interfaces

getAggregatedActivities(filters: ReportFilters, orgId: string, page: number, pageSize: number): PaginatedResult<ActivitySummaryRow>
getCoordinatorSummary(coordinatorId: string, filters: ReportFilters): CoordinatorSummary
getAssociationSummary(associationId: string, filters: ReportFilters): AssociationSummary
getActivityTypeCounts(filters: ReportFilters, orgId: string): ActivityTypeCount[]

Relationships

Dependents (2)

Components that depend on this component