Add dock category seed helper and product tag/prep fields.
Ensures chocolate and baklava exist for the website categories dock, and supports tag-filtered product lists for home carousels. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
d09eca8702
commit
5d1f8991f9
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Product" ADD COLUMN "preparationHours" INTEGER;
|
||||
+18
-17
@@ -156,23 +156,24 @@ model CategoryOptionEntry {
|
||||
}
|
||||
|
||||
model Product {
|
||||
id String @id @default(cuid())
|
||||
nameFa String
|
||||
nameEn String
|
||||
price Int @default(0)
|
||||
sellUnit SellUnit @default(unit)
|
||||
categoryId String
|
||||
category Category @relation(fields: [categoryId], references: [id], onDelete: Restrict)
|
||||
intro String @default("")
|
||||
description String @default("")
|
||||
mainImageUrl String?
|
||||
mainImageKey String?
|
||||
tags String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
gallery ProductGalleryImage[]
|
||||
options ProductOption[]
|
||||
orderItems OrderItem[]
|
||||
id String @id @default(cuid())
|
||||
nameFa String
|
||||
nameEn String
|
||||
price Int @default(0)
|
||||
sellUnit SellUnit @default(unit)
|
||||
categoryId String
|
||||
category Category @relation(fields: [categoryId], references: [id], onDelete: Restrict)
|
||||
intro String @default("")
|
||||
description String @default("")
|
||||
preparationHours Int?
|
||||
mainImageUrl String?
|
||||
mainImageKey String?
|
||||
tags String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
gallery ProductGalleryImage[]
|
||||
options ProductOption[]
|
||||
orderItems OrderItem[]
|
||||
|
||||
@@index([categoryId])
|
||||
@@index([price])
|
||||
|
||||
Reference in New Issue
Block a user