ScoDocMM/app/models/preferences.py

21 lines
518 B
Python
Raw Permalink Normal View History

# -*- coding: UTF-8 -*
"""Model : preferences
"""
from app import db
2021-08-13 00:34:58 +02:00
class ScoPreference(db.Model):
"""ScoDoc preferences (par département)"""
__tablename__ = "sco_prefs"
id = db.Column(db.Integer, primary_key=True)
pref_id = db.synonym("id")
2021-08-13 00:34:58 +02:00
dept_id = db.Column(db.Integer, db.ForeignKey("departement.id"))
name = db.Column(db.String(128), nullable=False, index=True)
value = db.Column(db.Text())
formsemestre_id = db.Column(db.Integer, db.ForeignKey("notes_formsemestre.id"))