mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-13 14:13:15 -06:00
add comments, fix key references
This commit is contained in:
@@ -7,7 +7,6 @@ class Season(db.Model):
|
|||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super(Season, self).__init__(**kwargs)
|
super(Season, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def episodes(self):
|
def episodes(self):
|
||||||
"""returns a List of Episodes under this Season"""
|
"""returns a List of Episodes under this Season"""
|
||||||
@@ -19,14 +18,19 @@ class Season(db.Model):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class Episode(db.Model):
|
class Episode(db.Model):
|
||||||
|
"""represents a Episode with underlying Sections (representing a specific cutscene or area"""
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
season_id = db.Column(db.Integer, db.ForeignKey('season.id'))
|
season_id = db.Column(db.Integer, db.ForeignKey('season.id'))
|
||||||
|
sections = db.relationship('Section', backref='episode', lazy='dynamic')
|
||||||
|
|
||||||
class Section(db.Model):
|
class Section(db.Model):
|
||||||
|
"""represents a Section of Quotes, a specific scene with relevant dialog"""
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
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')
|
quotes = db.relationship('Quote', backref='section', lazy='dynamic')
|
||||||
|
|
||||||
class Quote(db.Model):
|
class Quote(db.Model):
|
||||||
|
"""represents a specific quote by a specific speaker"""
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
section_id = db.Column(db.Integer, db.ForeignKey('section.id'))
|
section_id = db.Column(db.Integer, db.ForeignKey('section.id'))
|
||||||
speaker = db.Column(db.String(32))
|
speaker = db.Column(db.String(32))
|
||||||
|
|||||||
Reference in New Issue
Block a user