class MovieSchema(ma.SQLAlchemySchema): id = ma.String(data_key='imdb_id') title = ma.String() type = ma.String() startYear = ma.Integer() runtimeMinutes = ma.Integer() genres = ma.String() rating = ma.Nested(RatingSchema) poster = ma.Nested(PosterSchema, many=True)
class WatchedMoviesSchema(ma.SQLAlchemySchema): movie_id = ma.String() added_by = ma.String() movie = ma.Nested(MovieSchema)
class PosterSchema(ma.SQLAlchemySchema): url = ma.String()
class RatingSchema(ma.SQLAlchemySchema): average_rating = ma.String() num_votes = ma.Integer()
class ShowcaseSchema(ma.SQLAlchemySchema): movie_id = ma.String() movie = ma.Nested(MovieSchema)