Initialize the API and add managed app banners.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-09 17:08:47 +03:30
co-authored by Cursor
commit b15fefe438
158 changed files with 25624 additions and 0 deletions
@@ -0,0 +1,22 @@
CREATE TABLE IF NOT EXISTS "AppBanner" (
"id" TEXT NOT NULL,
"slot" TEXT NOT NULL,
"title" TEXT NOT NULL,
"subtitle" TEXT,
"ctaLabel" TEXT,
"ctaLink" TEXT,
"imageUrl" TEXT,
"displayOrder" INTEGER NOT NULL DEFAULT 0,
"isActive" BOOLEAN NOT NULL DEFAULT true,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "AppBanner_pkey" PRIMARY KEY ("id")
);
CREATE INDEX IF NOT EXISTS "AppBanner_slot_isActive_displayOrder_idx"
ON "AppBanner"("slot", "isActive", "displayOrder");
INSERT INTO "AppBanner" ("id", "slot", "title", "subtitle", "ctaLabel", "ctaLink", "displayOrder", "isActive", "createdAt", "updatedAt")
SELECT 'home-hero-default', 'home_hero', 'کالکشن پاییز و زمستان', 'جدیدترین پارچه‌ها', 'مشاهده کالکشن', '/categories', 0, true, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM "AppBanner" WHERE "id" = 'home-hero-default');