feat: basic screenshot manager

This commit is contained in:
Huskydog9988
2025-05-08 11:38:09 -04:00
committed by DecDuck
parent 3a9eb82fdf
commit 836ba33fe4
5 changed files with 99 additions and 3 deletions

View File

@ -35,6 +35,7 @@ model Game {
collections CollectionEntry[]
saves SaveSlot[]
screenshots Screenshot[]
@@unique([metadataSource, metadataId], name: "metadataKey")
}
@ -85,6 +86,22 @@ model SaveSlot {
@@id([gameId, userId, index], name: "id")
}
model Screenshot {
id String @id @default(uuid())
gameId String
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
objectId String
private Boolean @default(true)
createdAt DateTime @default(now()) @db.Timestamptz(0)
@@index([gameId, userId])
}
model Developer {
id String @id @default(uuid())