From 133ab9e6127982fabd0235ecb61c741c5c107313 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 8 Oct 2021 22:14:23 +0200 Subject: [PATCH] models: Add headers to separate model categories --- server/entertainment_decider/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/entertainment_decider/models.py b/server/entertainment_decider/models.py index 5930e56..87e5521 100644 --- a/server/entertainment_decider/models.py +++ b/server/entertainment_decider/models.py @@ -70,6 +70,9 @@ class CollectionStats: #### +## Tag & Selection Score's + + class Tag(db.Entity): id: int = orm.PrimaryKey(int, auto=True) @@ -83,6 +86,9 @@ class Tag(db.Entity): _media_list: Iterable[MediaElement] = orm.Set(lambda: MediaElement) +## Element <-> Collection Linking + + class MediaCollectionLink(db.Entity): collection: MediaCollection = orm.Required(lambda: MediaCollection) @@ -106,6 +112,9 @@ class MediaCollectionLink(db.Entity): natural_order = (season, episode, element_release_date, element_id) # unusuable due to ponyorm, see https://github.com/ponyorm/pony/issues/612 +## Media Elements + + class MediaElement(db.Entity): id: int = orm.PrimaryKey(int, auto=True) @@ -207,6 +216,9 @@ class MediaUriMapping(db.Entity): element: MediaElement = orm.Required(MediaElement) +## Media Collections + + class MediaCollection(db.Entity): id: int = orm.PrimaryKey(int, auto=True)