add comments, fix key references

This commit is contained in:
Xevion
2020-01-19 17:06:44 -06:00
parent bb0d10748e
commit d56c05c75e

View File

@@ -7,7 +7,6 @@ class Season(db.Model):
def __init__(self, **kwargs):
super(Season, self).__init__(**kwargs)
@property
def episodes(self):
"""returns a List of Episodes under this Season"""
@@ -19,14 +18,19 @@ class Season(db.Model):
pass
class Episode(db.Model):
"""represents a Episode with underlying Sections (representing a specific cutscene or area"""
id = db.Column(db.Integer, primary_key=True)
season_id = db.Column(db.Integer, db.ForeignKey('season.id'))
sections = db.relationship('Section', backref='episode', lazy='dynamic')
class Section(db.Model):
"""represents a Section of Quotes, a specific scene with relevant dialog"""
id = db.Column(db.Integer, primary_key=True)
episode_id = db.Column(db.Integer, db.ForeignKey('section.id'))
quotes = db.relationship('Quote', backref='section', lazy='dynamic')
class Quote(db.Model):
"""represents a specific quote by a specific speaker"""
id = db.Column(db.Integer, primary_key=True)
section_id = db.Column(db.Integer, db.ForeignKey('section.id'))
speaker = db.Column(db.String(32))