Data Layer low complexity backendmobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Data access layer for the `receipts` table in Supabase. Handles CRUD operations for receipt records, stores the cloud storage path and generated thumbnail URL, and maintains the foreign key relationship to the parent `expense_items` record. Provides query methods needed by the processing service and the approval workflow.

Feature: Receipt Upload & Management

receipt-storage-repository

Responsibilities

  • Create, read, update, and delete receipt records in the database
  • Store storage_path and thumbnail_url alongside expense item link
  • Query all receipts for a given expense item
  • Support soft-delete and status tracking for approval workflow

Interfaces

createReceipt(data)
getReceiptById(receiptId)
getReceiptsByExpenseItemId(expenseItemId)
updateReceiptStatus(receiptId, status)
deleteReceipt(receiptId)
getReceiptStoragePath(receiptId)
getThumbnailUrl(receiptId)

Related Data Entities (2)

Data entities managed by this component