feat: 收口多品牌与模板构建基础

This commit is contained in:
que01 committed 2026-09-25 02:55:46 +08:00
1 parent 0425a1c672
commit 77224ea51f
317 files changed
+11290 -1158

No files matched your search

@@ -0,0 +1 @@
ALTER TABLE "AdminUser" ADD COLUMN "mustChangePassword" BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,16 @@
CREATE TABLE "BrandRelease" (
"id" TEXT NOT NULL,
"brandId" TEXT NOT NULL,
"version" INTEGER NOT NULL,
"status" TEXT NOT NULL DEFAULT 'published',
"snapshot" JSONB NOT NULL,
"actorId" TEXT NOT NULL,
"note" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"revokedAt" TIMESTAMP(3),
CONSTRAINT "BrandRelease_pkey" PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX "BrandRelease_brandId_version_key" ON "BrandRelease"("brandId", "version");
CREATE INDEX "BrandRelease_brandId_status_createdAt_idx" ON "BrandRelease"("brandId", "status", "createdAt");
ALTER TABLE "BrandRelease" ADD CONSTRAINT "BrandRelease_brandId_fkey" FOREIGN KEY ("brandId") REFERENCES "BrandProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1 @@
ALTER TABLE "BrandRelease" ADD COLUMN "revokedBy" TEXT;