multivendor-promotion
v0.0.2
Published
Promotion engine: qualify/calculate/allocate/reserve/persist for multi-vendor marketplaces (not coupon_type extensions)
Maintainers
Readme
multivendor-promotion
Promotion engine for multi-vendor marketplaces. New retail mechanics live on the
promotion table — never as coupon_type integers.
Locked contracts
- Rounding:
roundMoney(n) = Math.round(n * 100) / 100(half-up to paise); residual on last eligible line. bogoReturnMode: refund_net: reduce refund at refund time — not a separate customer charge.giftOosPolicy: omit_with_notice: omit gift when OOS; continue checkout with notice.- MLM base: frozen admin-earning after unit price + line promo allocation — never MRP, never pre-coupon gross.
- Counters (Phase 0/2):
SELECT … FOR UPDATE. High-QPS flash scale-up is Phase 4 (atomicUPDATE/ Redis).
Build
pnpm run build && pnpm run test
# tag: promotion-v0.0.1