Capture exclusive promotion composition, empty-group cancel, and mall surface scope so the five marketing changes can be implemented without stacking or lifecycle ambiguity. Co-authored-by: Cursor <cursoragent@cursor.com>
1.9 KiB
1.9 KiB
Why
The mall's flash-sale page is display-only and prices are fixture-derived. A real event must allocate stock and resolve activity pricing inside checkout, not trust a price shown by the client.
What Changes
- Add shop-managed flash-sale sessions and activity products with localized display data, fixed minor-unit activity price, window, per-customer limit, and isolated activity stock.
- Add public session and product discovery APIs and replace the flash-sale page fixtures with live data.
- Make checkout resolve an active eligible activity server-side, atomically decrement activity stock with SKU stock, and snapshot the applied activity price on the order item.
- Compose exclusively with other promotions: a line MAY receive flash pricing or group-buy pricing, never both; a shop order that applied any flash price SHALL reject a coupon. Restate shop-coupon redemption and pending-payment coupon restore in this change's
orderspec so archival does not drop them. - Add shop-admin session and activity-product management scoped to the authenticated shop; mall payment and order-detail views show the snapshotted activity price.
Capabilities
New Capabilities
flash-sales: Timed shop flash-sale sessions, reserved activity inventory, eligibility, and public discovery.
Modified Capabilities
order: Checkout resolves and snapshots active flash-sale pricing.frontend-mall: Flash-sale discovery and product purchase use live data.frontend-shop-admin: Shops manage their own flash-sale configuration.
Non-goals
Queues, bot mitigation, platform-wide campaigns, waitlists, automatic retry after sell-out, and stacking coupons onto flash-priced shop orders are excluded. Overlapping group-buy on the same SKU is rejected rather than merged.
Impact
Adds a Rust marketing module and migrations, shared contract/locales, mall and shop-admin screens, and checkout concurrency coverage.