Expose certifications and per-country release dates
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
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
TMDb's release_dates/content_ratings blocks were already fetched via append_to_response but discarded at normalization -- every downstream layer (ingestion write, repository read, schema, service) was unbuilt. Adds the full pipeline: NormalizedReleaseDate + get_or_create_certification, a shared polymorphic sync/read (movie and series both use it), and MovieDetailOut/SeriesDetailOut certification + release_dates fields. Series content_ratings has no date of its own, so each rating is anchored to the show's first_air_date with release_type="tv". Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
340cadd99d
commit
e1a36ce227
@@ -11,6 +11,7 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from app.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
||||
from app.models.collection import Collection
|
||||
from app.models.enums import MovieStatus
|
||||
from app.models.language_country import Certification
|
||||
|
||||
|
||||
class Movie(Base, UUIDPrimaryKeyMixin, TimestampMixin):
|
||||
@@ -101,6 +102,8 @@ class ReleaseDate(Base, UUIDPrimaryKeyMixin):
|
||||
)
|
||||
note: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
|
||||
certification: Mapped[Certification | None] = relationship()
|
||||
|
||||
|
||||
class MovieRecommendation(Base):
|
||||
"""Recommendations/similar-title edges between movies."""
|
||||
|
||||
Reference in New Issue
Block a user