The website, the consumer app, and the business tools are three windows onto the same data. Key column names below; full definitions live in the companion markdown doc. Green = foreign key, orange = design note.
redemptions with a one-time code.verified_at stamped, performance_fee_amount snapshotted from the business's subscriptions.performance_fee_rate.points_ledger gets a +delta row tied to the redemption; badges checked.voided_at, void_reason) — the trust valve for scan-and-walk-away cases.invoice_lines under a new invoices row — every fee traceable to a real, verified purchase.redemptions.performance_fee_amount is copied at verification time, so later price changes never rewrite history — invoices stay defensible.points_balance column to drift out of sync; the ledger is the truth, and it gives the activity feed for free.enrollment_leads keeps tire-kickers out of the real businesses table; the step_reached ≥ 2 rule decides who gets a follow-up call.max_redemptions and budget_cap in the same transaction — the auto-pause promise is a database guarantee, not a cron job's best effort.qr_token. Merchant-presented QR pattern — no staff hardware, no staff app. Tokens rotate per location on demand; the redemption stores the scanned token for audit.business_users means the web Business Login and the app dashboard are one account system; the pricing gate rides the same session (the Street Cuisines role-middleware pattern).