Working sorting kinda?

This commit is contained in:
2025-07-26 19:00:19 +02:00
parent 3c0e191cd9
commit ef281ef70f
21 changed files with 586 additions and 169 deletions

View File

@ -23,26 +23,19 @@ model PortfolioImage {
fileKey String @unique
originalFile String @unique
fileType String
name String
fileSize Int
needsWork Boolean @default(true)
nsfw Boolean @default(false)
published Boolean @default(false)
setAsHeader Boolean @default(false)
needsWork Boolean @default(false)
altText String?
description String?
fileType String?
layoutGroup String?
fileSize Int?
layoutOrder Int?
month Int?
year Int?
creationDate DateTime?
// group String?
// kind String?
// series String?
// slug String?
// fileSize Int?
albumId String?
typeId String?
@ -51,13 +44,11 @@ model PortfolioImage {
metadata ImageMetadata?
categories PortfolioCategory[]
colors ImageColor[]
tags PortfolioTag[]
variants ImageVariant[]
@@index([typeId, year, layoutGroup, layoutOrder])
@@index([albumId, layoutGroup, layoutOrder])
categories PortfolioCategory[]
colors ImageColor[]
sortContexts PortfolioSortContext[]
tags PortfolioTag[]
variants ImageVariant[]
}
model PortfolioAlbum {
@ -116,6 +107,23 @@ model PortfolioTag {
images PortfolioImage[]
}
model PortfolioSortContext {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
year String
albumId String
type String
group String
sortOrder Int
imageId String
image PortfolioImage @relation(fields: [imageId], references: [id])
@@unique([imageId, year, albumId, type, group])
}
model Color {
id String @id @default(cuid())
createdAt DateTime @default(now())