Activity Attachments Table
Component Detail
Data Layer
medium complexity
mobilebackend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Drift DAO for the activity_attachments table, storing file references, MIME types, upload status, and parent activity foreign keys. Supports both confirmed remote URLs and local blob paths for offline-first operation, enabling seamless transition from pending to confirmed state.
activity-attachments-table
Responsibilities
- Insert attachment records with initial status of pending for offline-first write path
- Query all attachments for a given activity ID for display in wizard review and activity detail
- Update upload status to confirmed and persist remote URL once the backend acknowledges
- Soft-delete attachment records removed by the user before final wizard submission
Interfaces
insertAttachment(AttachmentCompanion) -> Future<int>
getAttachmentsForActivity(String activityId) -> Future<List<Attachment>>
updateUploadStatus(int id, UploadStatus status, {String? remoteUrl})
deleteAttachment(int id)