feat(catalog): add product catalog APIs
This commit is contained in:
+20
-9
@@ -52,15 +52,26 @@ model Category {
|
||||
|
||||
// ── 商品 ──────────────────────────────────────────────
|
||||
model Product {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
categoryId String?
|
||||
price Decimal @db.Decimal(10, 2)
|
||||
images String[]
|
||||
description String?
|
||||
status ProductStatus @default(DRAFT)
|
||||
category Category? @relation(fields: [categoryId], references: [id])
|
||||
orderItems OrderItem[]
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
categoryId String?
|
||||
price Decimal @db.Decimal(10, 2)
|
||||
originalPrice Decimal? @db.Decimal(10, 2)
|
||||
leadTime String @default("3-5个工作日")
|
||||
subtitle String?
|
||||
images String[]
|
||||
iconImg String?
|
||||
description String?
|
||||
story String?
|
||||
scene String?
|
||||
tags String[] @default([])
|
||||
specs Json @default("[]")
|
||||
tone Int[] @default([])
|
||||
mask Json
|
||||
sort Int @default(0)
|
||||
status ProductStatus @default(DRAFT)
|
||||
category Category? @relation(fields: [categoryId], references: [id])
|
||||
orderItems OrderItem[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Reference in New Issue
Block a user