initial work on metadata system

This commit is contained in:
DecDuck
2024-09-29 11:08:49 +10:00
parent e1a789fa36
commit 196f87c219
5 changed files with 278 additions and 0 deletions

View File

@ -34,3 +34,61 @@ model LinkedAuthMec {
@@id([userId, mec])
}
enum MetadataSource {
Custom
GiantBomb
}
model Game {
id String @id @default(uuid())
metadataSource MetadataSource
metadataId String
// Any field prefixed with m is filled in from metadata
// Acts as a cache so we can search and filter it
mName String // Name of game
mShortDescription String // Short description
mDescription String // Supports markdown
mDevelopers Developer[]
mPublishers Publisher[]
mReviewCount Int
mReviewRating Float
mIconId String // linked to objects in s3
mBannerId String // linked to objects in s3
mArt String[] // linked to objects in s3
mScreenshots String[] // linked to objects in s3
}
model Developer {
id String @id @default(uuid())
metadataSource MetadataSource
metadataId String
mName String
mShortDescription String
mDescription String
mLogo String
mBanner String
games Game[]
}
model Publisher {
id String @id @default(uuid())
metadataSource MetadataSource
metadataId String
mName String
mShortDescription String
mDescription String
mLogo String
mBanner String
games Game[]
}