partner_stores, store_inventories, store_purchases, store_sales tables. Promotes qr_code_batches.target_store_id and qr_codes.assigned_to_store_id to real FKs. StoreOperations service handles wholesale issuance (generates fresh batch -> codes go allocated to store -> inventory tops up -> StorePurchase recorded) and resident sales (codes flip allocated -> active to a household, commission computed at the store's rate). Admin endpoints: store CRUD, issue-inventory, record-sale. 160 feature tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB