feat(game): add unscored game category (§6.10)#41
Merged
Conversation
Adds a standalone `game` category (video games) — no brand FK; makers stored as free-text developers/publishers lists. Model + schema + serializer + router (list/detail, sort, unscored) + main registration + seed + dump COLLECTIONS + validate (GAME_REQUIRED) + integration tests. Enables a large real-data category (RAWG/IGDB) for the dataset toward 1M records.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
gamedevice category (§6.10) — the first non-hardware, non-brand-linked category — to support a large real-data collection (RAWG/IGDB video games) as the TechAPI dataset scales toward 1M records.Design: standalone table, no brand FK (a game's maker is its studio/publisher, which does not map onto the hardware Brand catalogue — stored as free-text
developers/publisherslists). Unscored (like laptop/monitor). Fields: name, release_date (nullable for TBA), rating, rating_count, metacritic, playtime_hours, platforms/genres/stores/developers/publishers/tags (JSON string lists), esrb_rating, background_image.Changes (the standard add-a-category set):
app/models/game.py,app/schemas/game.py+__init__exportsapp/schemas/serializers.py—game_read()app/routers/games.py— list (sort + pagination) + detail; registered inapp/main.pyapp/seed.py— game seed block (no FK resolution) + countapp/dump.py—"games"in COLLECTIONS (unscored)app/validate.py—GAME_REQUIRED+ validation blocktests/integration/{game_fixtures,test_games}.pyChecks:
ruff check app tests✅ ·mypy app✅ ·pytest tests/integration/test_games.py✅ (4 passed).Follow-up: TechAPI PR seeds
data/game/*from the RAWG dataset + mirrors the validate rule.