change UI & fix bugs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- Allow dynamic category ids on products (was Prisma enums)
|
||||
ALTER TABLE "Product" ALTER COLUMN "usageCategory" DROP DEFAULT;
|
||||
ALTER TABLE "Product" ALTER COLUMN "usageCategory" TYPE TEXT USING "usageCategory"::text;
|
||||
ALTER TABLE "Product" ALTER COLUMN "usageCategory" SET DEFAULT 'other';
|
||||
|
||||
ALTER TABLE "Product" ALTER COLUMN "season" DROP DEFAULT;
|
||||
ALTER TABLE "Product" ALTER COLUMN "season" TYPE TEXT USING "season"::text;
|
||||
ALTER TABLE "Product" ALTER COLUMN "season" SET DEFAULT 'all_season';
|
||||
|
||||
-- Persist admin-managed category definitions
|
||||
ALTER TABLE "SystemSettings" ADD COLUMN IF NOT EXISTS "categoryDefsJson" JSONB;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE "AppBanner" ADD COLUMN IF NOT EXISTS "showTitle" BOOLEAN NOT NULL DEFAULT true;
|
||||
ALTER TABLE "AppBanner" ADD COLUMN IF NOT EXISTS "showSubtitle" BOOLEAN NOT NULL DEFAULT true;
|
||||
ALTER TABLE "AppBanner" ADD COLUMN IF NOT EXISTS "showCta" BOOLEAN NOT NULL DEFAULT true;
|
||||
@@ -202,8 +202,8 @@ model Product {
|
||||
stock Float?
|
||||
isActive Boolean @default(true)
|
||||
/// فیلدهای نمایش کاتالوگ موکاپ (اپ کاربر)
|
||||
usageCategory ProductUsageCategory @default(other)
|
||||
season ProductSeason @default(all_season)
|
||||
usageCategory String @default("other")
|
||||
season String @default("all_season")
|
||||
widthCm Float?
|
||||
composition String?
|
||||
weightGrams Float?
|
||||
@@ -509,6 +509,8 @@ model SystemSettings {
|
||||
supportEmail String?
|
||||
/// تصاویر دستههای کاربرد/فصل اپ کاربر: { trousers: dataUrl, summer: dataUrl, ... }
|
||||
categoryImagesJson Json?
|
||||
/// تعاریف دستهها (کاربرد/فصل). اگر خالی باشد از مقادیر پیشفرض کد استفاده میشود.
|
||||
categoryDefsJson Json?
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
@@ -523,6 +525,9 @@ model AppBanner {
|
||||
imageUrl String?
|
||||
displayOrder Int @default(0)
|
||||
isActive Boolean @default(true)
|
||||
showTitle Boolean @default(true)
|
||||
showSubtitle Boolean @default(true)
|
||||
showCta Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user