Bufdir Reports Repository
Component Detail
Data Layer
low complexity
Shared Component
backend
0
Dependencies
2
Dependents
2
Entities
0
Integrations
Description
Repository managing the bufdir_reports and reporting_periods tables. Tracks which periods have been exported, when, and by whom, providing the audit trail and idempotency layer for the Bufdir Export Service. Shared with the Bufdir Report Generation feature on the mobile side.
bufdir-reports-repository
Responsibilities
- Persist export records including period, timestamp, exporting user, and artifact reference
- Query available reporting periods scoped to an organization
- Support idempotent re-export by looking up existing exports for a period
Interfaces
createExportRecord(record: ExportRecord): Promise<string>
getExportsByOrganization(organizationId: string): Promise<ExportRecord[]>
getExportByPeriod(organizationId: string, periodId: string): Promise<ExportRecord | null>
listReportingPeriods(organizationId: string): Promise<ReportingPeriod[]>
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (2)
Data entities managed by this component