completed game importing; partial work on version importing

This commit is contained in:
DecDuck
2024-10-11 00:37:08 +11:00
parent 718f5ba514
commit a7c33e7d43
42 changed files with 1499 additions and 281 deletions

View File

@ -45,6 +45,11 @@ enum ClientCapabilities {
DownloadAggregation
}
enum Platform {
Windows @map("windows")
Linux @map("linux")
}
// References a device
model Client {
id String @id @default(uuid())
@ -55,7 +60,7 @@ model Client {
capabilities ClientCapabilities[]
name String
platform String
platform Platform
lastConnected DateTime
}
@ -86,9 +91,9 @@ model Game {
mArt String[] // linked to objects in s3
mScreenshots String[] // linked to objects in s3
versionOrder String
versionOrder String[]
versions GameVersion[]
libraryBasePath String // Base dir for all the game versions
libraryBasePath String @unique // Base dir for all the game versions
@@unique([metadataSource, metadataId], name: "metadataKey")
}
@ -99,7 +104,9 @@ model GameVersion {
game Game @relation(fields: [gameId], references: [id])
versionName String // Sub directory for the game files
platform Platform
launchCommand String // Command to run to start. Platform-specific. Windows games on Linux will wrap this command in Proton/Wine
setupCommand String // Command to setup game (dependencies and such)
@@id([gameId, versionName])
}
@ -107,8 +114,9 @@ model GameVersion {
model Developer {
id String @id @default(uuid())
metadataSource MetadataSource
metadataId String
metadataSource MetadataSource
metadataId String
metadataOriginalQuery String
mName String
mShortDescription String
@ -119,14 +127,15 @@ model Developer {
games Game[]
@@unique([metadataSource, metadataId], name: "metadataKey")
@@unique([metadataSource, metadataId, metadataOriginalQuery], name: "metadataKey")
}
model Publisher {
id String @id @default(uuid())
metadataSource MetadataSource
metadataId String
metadataSource MetadataSource
metadataId String
metadataOriginalQuery String
mName String
mShortDescription String
@ -137,5 +146,5 @@ model Publisher {
games Game[]
@@unique([metadataSource, metadataId], name: "metadataKey")
@@unique([metadataSource, metadataId, metadataOriginalQuery], name: "metadataKey")
}