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
Completes the browse/discover set across all four entity types. Companies have no popularity or date field, so unlike movies/series/ people there's no sort_by choice -- always alphabetical by name. Filters are company_type (validated against the enum) and country (a plain ISO 3166-1 code comparison, nothing to validate). build_company_summary refactored to share row-to-summary logic with the new list path, same pattern used for movies/series/people. Co-Authored-By: Claude Sonnet 5 <[email protected]>
40 lines
909 B
Python
40 lines
909 B
Python
"""Company response schemas."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.schemas.common import CompanyBriefOut
|
|
from app.schemas.movie import MovieSummaryOut
|
|
from app.schemas.tv import SeriesSummaryOut
|
|
|
|
|
|
class CompanyDetailOut(BaseModel):
|
|
id: str
|
|
type: str = "company"
|
|
name: str
|
|
company_type: str
|
|
description: str | None = None
|
|
country: str | None = None
|
|
headquarters: str | None = None
|
|
homepage: str | None = None
|
|
logo_path: str | None = None
|
|
parent_company_id: str | None = None
|
|
external_ids: dict[str, str] = {}
|
|
|
|
movies: list[MovieSummaryOut] = []
|
|
series: list[SeriesSummaryOut] = []
|
|
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
|
|
class CompanyListOut(BaseModel):
|
|
page: int
|
|
page_size: int
|
|
total_results: int
|
|
total_pages: int
|
|
results: list[CompanyBriefOut] = []
|