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

Description

Persistence layer for confidentiality declaration records, linking each declaration to a user and storing signed date, version, document reference, and expiry. Provides query access for audit views and gating checks performed by the Declaration Service.

Feature: Confidentiality Declarations

declaration-store

Sources & reasoning

Section 2.1 lists driver honoraria and confidentiality declarations as a Blindeforbundet-specific need within the reimbursement workflow, placing it in the Phase 2 Core Product reimbursement scope alongside the rest of the expense stack.

Responsibilities

  • Persist declaration records keyed by user with signed date, version, and document reference
  • Index records by user, organisation, and expiry date for fast audit and reminder queries
  • Provide CRUD operations for declaration lifecycle management
  • Maintain referential integrity with the user record
  • Support historical retention of superseded declaration versions for audit

Interfaces

insertDeclaration(record): DeclarationRecord
findByUserId(userId): DeclarationRecord | null
findByOrg(orgId, filters): DeclarationRecord[]
findExpiringBefore(date): DeclarationRecord[]
updateDeclaration(id, patch): DeclarationRecord