feat: basic screenshot manager

This commit is contained in:
Huskydog9988
2025-05-08 11:38:09 -04:00
parent 143846c48a
commit f9f437dd85
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())

View File

@ -17,7 +17,8 @@ model User {
tokens APIToken[]
sessions Session[]
saves SaveSlot[]
saves SaveSlot[]
screenshots Screenshot[]
}
model Notification {