feat(products): port missing variant fields from henza and redesign variant modal
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- AlterTable: Add legacy variant fields (color, rialWage, details, description)
|
||||
ALTER TABLE "ProductVariant" ADD COLUMN IF NOT EXISTS "color" INTEGER;
|
||||
ALTER TABLE "ProductVariant" ADD COLUMN IF NOT EXISTS "rialWage" DECIMAL(18,0);
|
||||
ALTER TABLE "ProductVariant" ADD COLUMN IF NOT EXISTS "details" TEXT;
|
||||
ALTER TABLE "ProductVariant" ADD COLUMN IF NOT EXISTS "description" TEXT;
|
||||
@@ -728,6 +728,15 @@ model ProductVariant {
|
||||
isPreOrder Boolean @default(false)
|
||||
isActive Boolean @default(true)
|
||||
|
||||
/// Legacy color enum: 0=سفید, 1=زرد, 2=شکلاتی, 3=رزگلد
|
||||
color Int?
|
||||
/// Legacy rial_pay — fixed Rial making charge per variant.
|
||||
rialWage Decimal? @db.Decimal(18, 0)
|
||||
/// Legacy details — short description for variant.
|
||||
details String? @db.Text
|
||||
/// Legacy description — full description for variant.
|
||||
description String? @db.Text
|
||||
|
||||
/// The gallery image shown for this variant, picked from its own product's
|
||||
/// images — never a re-uploaded copy. onDelete: SetNull because dropping an
|
||||
/// image must never cascade into the variant: OrderItem rows reference
|
||||
|
||||
Reference in New Issue
Block a user