Data Layer medium complexity backendmobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Data access layer responsible for persisting declaration versions, user submission records, and compliance state. Stores each accepted declaration with user ID, version ID, and timestamp to support audit trail requirements. Provides queries used by both the mobile app and the admin portal.

Feature: Confidentiality Declarations

confidentiality-declaration-repository

Sources & reasoning

Line 70 explicitly names taushetseerklæringer (confidentiality declarations) for drivers as a Blindeforbundet expense-area requirement. The expense-reimbursement area is Phase 2 (lines 148, 343), placing this at v1.0. This is a legal compliance requirement, not a preference, which drives the must-enforce-before-submit design.

  • docs/source/likeperson.md · line 70
    Sjåfærhonorarer og taushetseerklæringer for sjåfører (Blindeforbundet).

Responsibilities

  • Store and retrieve versioned declaration documents
  • Persist user declaration submissions with full audit metadata
  • Query compliance status per user or across an organisation
  • Support offline sync by caching current declaration version locally
  • Enforce referential integrity between users and declaration records

Interfaces

saveDeclarationRecord(record: DeclarationRecord): void
findLatestDeclarationByUser(userId): DeclarationRecord | null
getActiveVersion(): DeclarationVersion
getAllRecordsByOrg(orgId): DeclarationRecord[]
upsertDeclarationVersion(version: DeclarationVersion): void

Related Data Entities (1)

Data entities managed by this component