Data Layer high complexity backend
0
Dependencies
2
Dependents
5
Entities
0
Integrations

Description

Data access layer for reimbursement records, encapsulating all PostgreSQL queries including CTE-based aggregations and window function computations for the overview dashboard. Provides both raw record access and pre-aggregated result sets optimized for dashboard rendering and export.

Feature: Reimbursement Overview

reimbursement-repository

Responsibilities

  • Execute CTE-based aggregation queries grouping by period, expense type, and user
  • Apply date-range and status filters to reimbursement queries
  • Return raw reimbursement rows for export with all joined fields
  • Enforce organization-scoped row filtering in all queries
  • Provide paginated result sets for the data table

Interfaces

findAggregatedByPeriod(orgId, granularity, dateRange)
findByPeerMentor(orgId, userId, dateRange)
findByStatus(orgId, status, pagination)
findAllForExport(orgId, filters)
findById(reimbursementId)
countByStatus(orgId, dateRange)
sumByPeriod(orgId, granularity, dateRange)
findOutstanding(orgId)

Relationships

Dependents (2)

Components that depend on this component