예제 #1
0
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)
예제 #2
0
class WatchedMoviesSchema(ma.SQLAlchemySchema):
    movie_id = ma.String()
    added_by = ma.String()
    movie = ma.Nested(MovieSchema)
예제 #3
0
class PosterSchema(ma.SQLAlchemySchema):
    url = ma.String()
예제 #4
0
class RatingSchema(ma.SQLAlchemySchema):
    average_rating = ma.String()
    num_votes = ma.Integer()
예제 #5
0
class ShowcaseSchema(ma.SQLAlchemySchema):
    movie_id = ma.String()
    movie = ma.Nested(MovieSchema)