base commit
This commit is contained in:
@@ -20,15 +20,32 @@ model Product {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
slug String @unique
|
||||
shortDescription String?
|
||||
description String?
|
||||
/// Цена в копейках (целое число, без дробной части)
|
||||
priceCents Int
|
||||
imageUrl String?
|
||||
published Boolean @default(false)
|
||||
inStock Boolean @default(true)
|
||||
leadTimeDays Int?
|
||||
category Category @relation(fields: [categoryId], references: [id], onDelete: Cascade)
|
||||
categoryId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
images ProductImage[]
|
||||
}
|
||||
|
||||
model ProductImage {
|
||||
id String @id @default(cuid())
|
||||
url String
|
||||
sort Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
productId String
|
||||
|
||||
@@index([productId, sort])
|
||||
}
|
||||
|
||||
model User {
|
||||
|
||||
Reference in New Issue
Block a user