Receipt Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Data access layer for the expense_receipts table. Persists receipt metadata (object key, URL, file size, MIME type) linked to the parent expense record. Supports listing all receipts for an expense and hard deletion when a receipt is removed.
receipt-repository
Responsibilities
- Insert receipt metadata rows into expense_receipts table
- Query all receipts for a given expense_id
- Delete receipt record by receipt_id
- Provide receipt metadata (URL, size, upload timestamp) to service layer
Interfaces
createReceipt(expenseId: String, objectKey: String, url: String, sizeBytes: int) -> ReceiptAttachment
getReceiptsByExpense(expenseId: String) -> List<ReceiptAttachment>
deleteReceipt(receiptId: String) -> void
getReceiptById(receiptId: String) -> ReceiptAttachment
Relationships
Dependents (3)
Components that depend on this component