Phase 5a: Receipt Model + Photo Upload
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-apiDepends on: Phase 5 (COMPLETED)
Scope
Implements the updated domain model from
arch-domain-mcd-tracker. Adds Receipt entity and updates CouponUsage.- Add
ReceiptSQLAlchemy model: - Update
CouponUsagemodel: - 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 /codesto accept optionalreceipt_id - Update Pydantic schemas for new/changed fields
- Integration tests for receipt upload, photo serving, receipt-to-code linking
- pending
Related
phase-mcd-tracker-5-core-api— parent phaseplan-mcd-tracker— parent planarch-domain-mcd-tracker— Receipt entity + updated CouponUsagearch-dataflow-mcd-tracker#flow-1-scan-receipt— scan receipt flow