Bufdir Reports Table
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
4
Dependents
0
Entities
0
Integrations
Description
PostgreSQL repository for persisting generated Bufdir reports with full metadata including reporting period, organization scope, generation status, Bufdir spec version used, and cached mobile preview payload. Supports report history queries and submission status tracking per organization.
bufdir-reports-table
Responsibilities
- Persist generated Bufdir report records with period, org scope, and content
- Track report generation status (pending, processing, complete, error) per organization
- Store report content versioned against the Bufdir spec version that produced it
- Cache serialized report preview payloads for mobile offline delivery
Interfaces
create(dto: CreateBufdirReportDto) -> BufdirReport
findById(reportId: string) -> BufdirReport | null
findByOrganization(organizationId: string, filters: ReportFilters) -> BufdirReport[]
updateStatus(reportId: string, status: ReportStatus) -> void
savePreviewCache(reportId: string, preview: ReportPreview) -> void
getPreviewCache(reportId: string) -> ReportPreview | null
delete(reportId: string) -> void
Relationships
Dependents (4)
Components that depend on this component