Declarations Table
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Declarations Table
declarations-table
Responsibilities
- Persist signed declaration records with user_id, activity_id, declaration_version, and accepted_at for audit purposes
- Support compliance queries by user, activity, organization, and date range
- Store declaration version reference so the exact legal text accepted can be reproduced during inspections
Interfaces
insert(DeclarationRecord) → Future<void>
findByActivityId(activityId: String) → Future<List<DeclarationRecord>>
findByUserId(userId: String) → Future<List<DeclarationRecord>>
findByOrganizationId(organizationId: String, dateRange: DateRange) → Future<List<DeclarationRecord>>