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;
|
||||
+15
-10
@@ -189,21 +189,21 @@ model Catalog {
|
||||
}
|
||||
|
||||
model Product {
|
||||
id String @id @default(cuid())
|
||||
id String @id @default(cuid())
|
||||
companyId String
|
||||
catalogId String
|
||||
name String
|
||||
code String
|
||||
color String
|
||||
description String?
|
||||
minMeterage Float @default(30)
|
||||
orderMultiplier Float @default(10)
|
||||
minMeterage Float @default(30)
|
||||
orderMultiplier Float @default(10)
|
||||
basePrice Float?
|
||||
stock Float?
|
||||
isActive Boolean @default(true)
|
||||
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?
|
||||
@@ -212,10 +212,10 @@ model Product {
|
||||
tagsJson Json?
|
||||
imageUrlsJson Json?
|
||||
subtitle String?
|
||||
rollMeters Float @default(50)
|
||||
isNew Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
rollMeters Float @default(50)
|
||||
isNew Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
|
||||
catalog Catalog @relation(fields: [catalogId], references: [id], onDelete: Cascade)
|
||||
@@ -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
|
||||
|
||||
|
||||
+9
-4
File diff suppressed because one or more lines are too long
+294
-22
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user