Bundles get a kind: exact (as before), mix (any setSize of the qualifying tickets for a set price), free (cheapest freeCount in each set free) and group (setSize or more qualifying tickets at a per-ticket price or % off, applied once). The supervisor page has a type picker, buyers see a one-line description of each deal, and the Complete bundle cards handle every type. Demo: Family Fun Day adds a Lunch for four deal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
390 B
SQL
13 lines
390 B
SQL
-- CreateEnum
|
|
CREATE TYPE "BundleKind" AS ENUM ('exact', 'mix', 'free', 'group');
|
|
|
|
-- CreateEnum
|
|
CREATE TYPE "BundleGroupPricing" AS ENUM ('per_ticket', 'percent');
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "EventBundle" ADD COLUMN "freeCount" INTEGER,
|
|
ADD COLUMN "groupPricing" "BundleGroupPricing",
|
|
ADD COLUMN "kind" "BundleKind" NOT NULL DEFAULT 'exact',
|
|
ADD COLUMN "setSize" INTEGER;
|
|
|