Files
Aurora-Core/app/schemas/account.py
T
NixReaperandClaude Sonnet 5 0ab31a314c Add movie/series ratings and watchlist
Builds on the accounts foundation: PUT/DELETE a rating (0.5-10.0) or a
watchlist entry on any movie or series, all scoped to the bearer token's
own user, plus GET /account/ratings|watchlist/{movies,series} to list
them back. Both are polymorphic entity_type/entity_id tables, same shape
as watch_provider_offerings and trending_entries, so movie and series
share one repository/router each rather than duplicating per type.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-06 10:47:41 -05:00

22 lines
592 B
Python

"""Request/response schemas for the authenticated user's own ratings and
watchlist (section 17, additive)."""
from __future__ import annotations
from datetime import datetime
from pydantic import BaseModel, Field
class RatingIn(BaseModel):
# 0.5-10.0 in practice (TMDb's own scale), enforced as a continuous
# range rather than an enum of 0.5 steps -- not worth the extra
# validation for a value nothing downstream treats as discrete.
value: float = Field(ge=0.5, le=10.0)
class RatingOut(BaseModel):
value: float
created_at: datetime
updated_at: datetime