Add game category and region metadata for genlocke presets

Add `category` field (original/remake/enhanced/sequel/spinoff) to the
Game model and tag all 38 games. Create regions.json with generation
mapping, ordering, and genlocke preset defaults per region. Add
GET /games/by-region endpoint returning games grouped by region.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 09:06:15 +01:00
parent dab0cf986f
commit aaaeb2146e
9 changed files with 237 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ class GameResponse(CamelModel):
slug: str
generation: int
region: str
category: str | None = None
box_art_url: str | None
release_year: int | None
color: str | None
@@ -39,6 +40,7 @@ class GameCreate(CamelModel):
slug: str
generation: int
region: str
category: str | None = None
box_art_url: str | None = None
release_year: int | None = None
color: str | None = None
@@ -49,11 +51,25 @@ class GameUpdate(CamelModel):
slug: str | None = None
generation: int | None = None
region: str | None = None
category: str | None = None
box_art_url: str | None = None
release_year: int | None = None
color: str | None = None
class GenlockeDefaultsResponse(CamelModel):
true_genlocke: str # game slug for true genlocke default
normal_genlocke: str # game slug for normal genlocke default
class RegionResponse(CamelModel):
name: str
generation: int
order: int
genlocke_defaults: GenlockeDefaultsResponse
games: list[GameResponse] = []
class RouteCreate(CamelModel):
name: str
order: int