mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Add done to models
This commit is contained in:
parent
b02a6683f7
commit
28e80c27fa
1 changed files with 2 additions and 0 deletions
|
@ -515,6 +515,8 @@ class Semester(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
label = db.Column(db.String(10), db.CheckConstraint("label IN ('WS', 'SS')"), nullable=False)
|
label = db.Column(db.String(10), db.CheckConstraint("label IN ('WS', 'SS')"), nullable=False)
|
||||||
year = db.Column(db.Integer, db.CheckConstraint(f"year BETWEEN {MIN_YEAR} AND {MAX_YEAR}"), nullable=False)
|
year = db.Column(db.Integer, db.CheckConstraint(f"year BETWEEN {MIN_YEAR} AND {MAX_YEAR}"), nullable=False)
|
||||||
|
# Assistants can not work in semesters that are done
|
||||||
|
done = db.Column(db.Boolean, default=False, nullable=False)
|
||||||
|
|
||||||
parts = db.relationship("Part", back_populates="semester", lazy=True)
|
parts = db.relationship("Part", back_populates="semester", lazy=True)
|
||||||
semester_experiments = db.relationship("SemesterExperiment", back_populates="semester", lazy=True)
|
semester_experiments = db.relationship("SemesterExperiment", back_populates="semester", lazy=True)
|
||||||
|
|
Loading…
Reference in a new issue