mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-11 08:08:53 -06:00
add comments, fix key references
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user