fix time table
This commit is contained in:
@@ -27,6 +27,11 @@ class Reservation(db.Model):
|
||||
created_at = db.Column(db.DateTime, default=datetime.utcnow)
|
||||
updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
# Relationships
|
||||
classroom = db.relationship('Classroom', backref=db.backref('reservation_list', lazy=True, cascade='all, delete-orphan'))
|
||||
commission = db.relationship('Commission', backref=db.backref('reservation_list', lazy=True, cascade='all, delete-orphan'))
|
||||
# User already defines the relationship back to reservation
|
||||
|
||||
def to_dict(self):
|
||||
"""Convert reservation to dictionary"""
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user