
This commit implements a simple movie database backend inspired by IMDb. It includes: - API endpoints for movies, actors, directors and genres - SQLAlchemy models with relationships - Alembic migrations - Pydantic schemas for request/response validation - Search and filtering functionality - Health check endpoint - Complete documentation
10 lines
373 B
Python
10 lines
373 B
Python
from sqlalchemy import Column, Integer, ForeignKey, String
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class MovieActor(Base):
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
movie_id = Column(Integer, ForeignKey("movie.id"), nullable=False)
|
|
actor_id = Column(Integer, ForeignKey("actor.id"), nullable=False)
|
|
character_name = Column(String(255), nullable=True) |