Files
Aurora-Core/app/schemas/movie.py
T
NixReaperandClaude Sonnet 5 c20df1c503
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
Initial Aurora Core 0.1 implementation
Production-grade media metadata backend per docs/aurora-core-spec.md:
Aurora-owned UUIDv7 identity system, normalized movie/TV/people/credits
schema, provider abstraction with a TMDb adapter, an idempotent async
ingestion pipeline (normalize -> match -> upsert -> provenance), a
Postgres FTS/trigram search layer, a stateless FastAPI v1 API with
Redis caching/rate-limiting, arq workers, dev/prod Docker Compose
topologies, unit + integration + load tests, CI, and architecture/
database/API/ERD documentation.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-04 17:34:03 -05:00

81 lines
1.8 KiB
Python

"""Movie response schemas."""
from __future__ import annotations
from datetime import date, datetime
from pydantic import BaseModel
from app.schemas.common import (
CastCreditOut,
CollectionBriefOut,
CompanyBriefOut,
CrewCreditOut,
GenreOut,
ImagesOut,
KeywordOut,
VideoOut,
)
class MovieSummaryOut(BaseModel):
"""Compact movie representation used in lists and search results."""
id: str
type: str = "movie"
title: str
original_title: str | None = None
overview: str | None = None
release_date: date | None = None
poster_path: str | None = None
popularity: float | None = None
vote_average: float | None = None
class MovieDetailOut(BaseModel):
id: str
type: str = "movie"
title: str
original_title: str | None = None
overview: str | None = None
tagline: str | None = None
status: str
original_language: str | None = None
release_date: date | None = None
runtime: int | None = None
budget: int | None = None
revenue: int | None = None
popularity: float | None = None
vote_average: float | None = None
vote_count: int | None = None
adult: bool = False
genres: list[GenreOut] = []
keywords: list[KeywordOut] = []
cast: list[CastCreditOut] = []
crew: list[CrewCreditOut] = []
companies: list[CompanyBriefOut] = []
collection: CollectionBriefOut | None = None
images: ImagesOut = ImagesOut()
videos: list[VideoOut] = []
external_ids: dict[str, str] = {}
created_at: datetime
updated_at: datetime
class MovieCreditsOut(BaseModel):
id: str
cast: list[CastCreditOut] = []
crew: list[CrewCreditOut] = []
class MovieImagesOut(BaseModel):
id: str
images: ImagesOut = ImagesOut()
class MovieVideosOut(BaseModel):
id: str
videos: list[VideoOut] = []