Data Layer low complexity backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Data access layer for confidentiality declaration records stored in the documents table. Manages declaration text versions with content hashes, user acknowledgement timestamps, and links to the triggering expense or assignment record. Supports queries by user, organization, expense type, and declaration version.

Feature: Confidentiality Declarations

declaration-store

Responsibilities

  • Persist declaration acknowledgement records with timestamps and version hashes
  • Query declaration status by user and expense type
  • Store and retrieve versioned declaration text content
  • Link declaration records to expenses and assignments

Interfaces

saveAcknowledgement(record: AcknowledgementRecord): void
findByUser(userId: string): AcknowledgementRecord[]
findByUserAndExpenseType(userId: string, expenseTypeId: string): AcknowledgementRecord | null
saveDeclarationVersion(version: DeclarationVersion): void
getLatestVersion(expenseTypeId: string): DeclarationVersion
findByOrganization(organizationId: string): UserDeclarationStatus[]

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component