mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-08-20 21:41:28 +10:00
Add age ratings (#451)
* Base age rating system * Cleanup enum leftovers * Missed files * GB importer * Linter settings * Translations * Prettier and linting --------- Co-authored-by: Robert Clabough <robert@clabough.tech>
This commit is contained in:
co-authored by
Robert Clabough
parent
8e75a0bf56
commit
97c6f2c8a6
@@ -31,7 +31,8 @@ model Game {
|
||||
mDescription String // Supports markdown
|
||||
mReleased DateTime // When the game was released
|
||||
|
||||
ratings GameRating[]
|
||||
ratings GameRating[]
|
||||
ageRatings GameAgeRating[]
|
||||
|
||||
featured Boolean @default(false)
|
||||
|
||||
@@ -73,6 +74,29 @@ model GameTag {
|
||||
@@index([name(ops: raw("gist_trgm_ops(siglen=32)"))], type: Gist)
|
||||
}
|
||||
|
||||
enum AgeRatingOrganization {
|
||||
ESRB
|
||||
PEGI
|
||||
CERO
|
||||
USK
|
||||
GRAC
|
||||
ClassInd
|
||||
ACB
|
||||
}
|
||||
|
||||
model GameAgeRating {
|
||||
id String @id @default(uuid())
|
||||
|
||||
organization AgeRatingOrganization
|
||||
rating String // e.g. "E", "T", "M", "18", "CERO_B", comes from server enums
|
||||
ratingCoverUrl String? // Badge image URL from IGDB, optional
|
||||
|
||||
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
||||
gameId String
|
||||
|
||||
@@unique([gameId, organization], name: "gameOrganizationKey")
|
||||
}
|
||||
|
||||
model GameRating {
|
||||
id String @id @default(uuid())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user