Coverage for src/schemas/meta_profile_content_schema.py : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from src import ma
3from src.model import MetaProfileContentModel
4from src.utils import SQLAlchemyAutoSchema
7class MetaProfileContentMeta:
8 model = MetaProfileContentModel
11class MetaProfileContentBase(SQLAlchemyAutoSchema):
12 class Meta(MetaProfileContentMeta):
13 fields = ("rating", "last_rating_date",
14 "review_see_count", "last_review_see_date", "count", "last_count_increment")
17class MetaProfileApplicationItem(SQLAlchemyAutoSchema):
18 application = ma.Nested("ApplicationBase")
20 class Meta(MetaProfileContentMeta):
21 fields = ("application", "rating", "last_rating_date",
22 "review_see_count", "last_review_see_date", "count", "last_count_increment")
25class MetaProfileBookItem(SQLAlchemyAutoSchema):
26 book = ma.Nested("BookBase")
28 class Meta(MetaProfileContentMeta):
29 fields = ("book", "rating", "last_rating_date",
30 "review_see_count", "last_review_see_date", "count", "last_count_increment")
33class MetaProfileGameItem(SQLAlchemyAutoSchema):
34 game = ma.Nested("GameBase")
36 class Meta(MetaProfileContentMeta):
37 fields = ("game", "rating", "last_rating_date",
38 "review_see_count", "last_review_see_date", "count", "last_count_increment")
41class MetaProfileMovieItem(SQLAlchemyAutoSchema):
42 movie = ma.Nested("MovieBase")
44 class Meta(MetaProfileContentMeta):
45 fields = ("movie", "rating", "last_rating_date",
46 "review_see_count", "last_review_see_date", "count", "last_count_increment")
49class MetaProfileSerieItem(SQLAlchemyAutoSchema):
50 serie = ma.Nested("SerieBase")
52 class Meta(MetaProfileContentMeta):
53 fields = ("serie", "rating", "last_rating_date",
54 "review_see_count", "last_review_see_date", "count", "last_count_increment")
57class MetaProfileTrackItem(SQLAlchemyAutoSchema):
58 track = ma.Nested("TrackBase")
60 class Meta(MetaProfileContentMeta):
61 fields = ("track", "rating", "last_rating_date",
62 "review_see_count", "last_review_see_date", "count", "last_count_increment")