feat: add series support for books and games (#54)

Implements series grouping functionality for books and games to allow
tracking franchises and related items.

Database changes:
- Add series (optional string) and seriesOrder (optional number) fields to Book model
- Add series (optional string) and seriesOrder (optional number) fields to Game model

Backend changes:
- Add GET /books/series/:seriesName endpoint to fetch all books in a series
- Add GET /games/series/:seriesName endpoint to fetch all games in a series
- Add getBooksBySeries() method to BookService (orders by seriesOrder asc)
- Add getGamesBySeries() method to GameService (orders by seriesOrder asc)
- Create/Update endpoints automatically handle series fields via DTOs

Frontend changes:
- Add series and seriesOrder input fields to "Add New Book" form
- Add series and seriesOrder input fields to "Edit Book" form
- Add series and seriesOrder input fields to "Add New Game" form
- Add series and seriesOrder input fields to "Edit Game" form

Type definitions:
- Update Book and CreateBookDto interfaces with series fields
- Update Game and CreateGameDto interfaces with series fields

Closes #54

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 22:52:33 -08:00
parent f2797d0479
commit 5a59afaa5e
9 changed files with 169 additions and 0 deletions
+4
View File
@@ -32,6 +32,8 @@ model Game {
coverImage String?
tags String[]
links Link[]
series String?
seriesOrder Int? @db.Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
comments Comment[]
@@ -58,6 +60,8 @@ model Book {
coverImage String?
tags String[]
links Link[]
series String?
seriesOrder Int? @db.Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
comments Comment[]