x
This commit is contained in:
1 parent
0ceee3dbff
commit
2d39edbd57
18 files changed
+804
-153
No files matched your search
@@ -35,6 +35,7 @@ model Category {
|
||||
name String @unique
|
||||
imageUrl String?
|
||||
layoutType String @default("split_showcase")
|
||||
media CategoryMedia[]
|
||||
products Product[]
|
||||
attributes AttributeDefinition[]
|
||||
translations CategoryTranslation[]
|
||||
@@ -45,6 +46,24 @@ model Category {
|
||||
@@index([deletedAt])
|
||||
}
|
||||
|
||||
model CategoryMedia {
|
||||
id Int @id @default(autoincrement())
|
||||
categoryId Int
|
||||
category Category @relation(fields: [categoryId], references: [id], onDelete: Cascade)
|
||||
role String
|
||||
url String
|
||||
width Int?
|
||||
height Int?
|
||||
focalX Float @default(0.5)
|
||||
focalY Float @default(0.5)
|
||||
sortOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([categoryId, role])
|
||||
@@index([categoryId, sortOrder])
|
||||
}
|
||||
|
||||
model CategoryTranslation {
|
||||
id Int @id @default(autoincrement())
|
||||
categoryId Int
|
||||
|
||||
Reference in new issue
Block a user