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

Description

Persists document attachment metadata to the PostgreSQL database, storing filename, MIME type, file size, storage key, upload timestamp, and a foreign key linking the attachment to its parent activity record. Provides query methods to retrieve all attachments for a given activity and to soft-delete attachment records when files are removed.

Feature: Document Attachment to Activities

attachment-repository

Responsibilities

  • Insert attachment metadata records linked to an activity via foreign key
  • Retrieve all attachments for a given activity ID
  • Soft-delete or hard-delete attachment records on removal
  • Expose attachment metadata for display in activity detail and admin audit views

Interfaces

saveAttachment(AttachmentMetadata metadata)
getAttachmentsByActivityId(String activityId)
getAttachmentById(String attachmentId)
deleteAttachment(String attachmentId)
getAttachmentCount(String activityId)
listAttachmentsForAudit(String organizationId, DateRange range)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component