Refactor mosaic
This commit is contained in:
@ -25,8 +25,9 @@ model PortfolioImage {
|
||||
originalFile String @unique
|
||||
name String
|
||||
nsfw Boolean @default(false)
|
||||
published Boolean @default(true)
|
||||
published Boolean @default(false)
|
||||
setAsHeader Boolean @default(false)
|
||||
needsWork Boolean @default(false)
|
||||
|
||||
altText String?
|
||||
description String?
|
||||
@ -43,8 +44,10 @@ model PortfolioImage {
|
||||
// slug String?
|
||||
// fileSize Int?
|
||||
|
||||
typeId String?
|
||||
type PortfolioType? @relation(fields: [typeId], references: [id])
|
||||
albumId String?
|
||||
typeId String?
|
||||
album PortfolioAlbum? @relation(fields: [albumId], references: [id])
|
||||
type PortfolioType? @relation(fields: [typeId], references: [id])
|
||||
|
||||
metadata ImageMetadata?
|
||||
|
||||
@ -52,6 +55,23 @@ model PortfolioImage {
|
||||
colors ImageColor[]
|
||||
tags PortfolioTag[]
|
||||
variants ImageVariant[]
|
||||
|
||||
@@index([typeId, year, layoutGroup, layoutOrder])
|
||||
@@index([albumId, layoutGroup, layoutOrder])
|
||||
}
|
||||
|
||||
model PortfolioAlbum {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
sortIndex Int @default(0)
|
||||
|
||||
name String @unique
|
||||
slug String @unique
|
||||
|
||||
description String?
|
||||
|
||||
images PortfolioImage[]
|
||||
}
|
||||
|
||||
model PortfolioType {
|
||||
|
Reference in New Issue
Block a user