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

Description

Persists encrypted assignment records including the ciphertext blob, sender and recipient metadata, dispatch timestamp, and current lifecycle status. Plaintext content is never written to this table; only the encrypted blob produced by the Encryption Service is stored.

Feature: Encrypted Assignment Dispatch

assignments-table

Responsibilities

  • Store encrypted assignment content blob with recipient public key reference
  • Track assignment lifecycle status (dispatched, delivered, acknowledged, actioned)
  • Support coordinator queries filtered by recipient, status, and age
  • Enforce row-level access so only the intended recipient can retrieve the encrypted blob

Interfaces

insertAssignment(assignment) -> Assignment
findByRecipient(userId) -> Assignment[]
findById(assignmentId) -> Assignment
updateStatus(assignmentId, status)
listByCoordinator(coordinatorId, filters) -> Assignment[]