Phase 5a: Receipt Model + Photo Upload

phase-mcd-tracker-5a-receipt-model Phase

phase
Goal: Receipt as a first-class entity — photo upload, Receipt model, CouponUsage linked to receipts, Alembic migration. The scan flow has a backend.
Owner: Dev agent
Repo: forgejo_admin/mcd-tracker-api
Depends on: Phase 5 (COMPLETED)

Scope

Implements the updated domain model from arch-domain-mcd-tracker. Adds Receipt entity and updates CouponUsage.
  • Add Receipt SQLAlchemy model:
  • Update CouponUsage model:
  • Alembic migration for both changes (add Receipt table, alter CouponUsage columns)
  • Add photo upload PVC mount to kustomize overlay (pal-e-deployments):
  • Add routes:
  • Update POST /codes to accept optional receipt_id
  • Update Pydantic schemas for new/changed fields
  • Integration tests for receipt upload, photo serving, receipt-to-code linking

  • pending
  • phase-mcd-tracker-5-core-api — parent phase
  • plan-mcd-tracker — parent plan
  • arch-domain-mcd-tracker — Receipt entity + updated CouponUsage
  • arch-dataflow-mcd-tracker#flow-1-scan-receipt — scan receipt flow