feat(store): new endpoints, ui and beginnings of main store page

This commit is contained in:
DecDuck
2024-11-23 21:29:24 +11:00
parent 9c2249ed08
commit 9cbdcbcdf6
13 changed files with 272 additions and 83 deletions

View File

@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Game" ADD COLUMN "created" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
-- AlterTable
ALTER TABLE "GameVersion" ADD COLUMN "created" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

View File

@ -1,6 +1,6 @@
enum MetadataSource {
Custom
GiantBomb
Custom
GiantBomb
}
model Game {
@ -8,6 +8,7 @@ model Game {
metadataSource MetadataSource
metadataId String
created DateTime @default(now())
// Any field prefixed with m is filled in from metadata
// Acts as a cache so we can search and filter it
@ -34,8 +35,10 @@ model Game {
// A particular set of files that relate to the version
model GameVersion {
gameId String
game Game @relation(fields: [gameId], references: [id])
game Game @relation(fields: [gameId], references: [id])
versionName String // Sub directory for the game files
created DateTime @default(now())
platform Platform
launchCommand String // Command to run to start. Platform-specific. Windows games on Linux will wrap this command in Proton/Wine