2021-05-06 10:26:28 +02:00
|
|
|
from app import db
|
|
|
|
|
2021-05-07 14:27:06 +02:00
|
|
|
Ressources_ACs = db.Table("Ressources_ACs",
|
|
|
|
db.Column("Ressource_code", db.String(4), db.ForeignKey("ressource.code")),
|
|
|
|
db.Column("AC_code", db.String(6), db.ForeignKey("AC.code"))
|
|
|
|
)
|
|
|
|
|
|
|
|
Ressources_SAEs = db.Table("Ressources_SAEs",
|
|
|
|
db.Column("Ressource_code", db.String(4), db.ForeignKey("ressource.code")),
|
|
|
|
db.Column("SAE_code", db.String(5), db.ForeignKey("SAE.code"))
|
|
|
|
)
|
|
|
|
|
|
|
|
SAEs_ACs = db.Table("SAEs_ACs",
|
|
|
|
db.Column("SAE_code", db.String(5), db.ForeignKey("SAE.code")),
|
|
|
|
db.Column("AC_code", db.String(6), db.ForeignKey("AC.code"))
|
|
|
|
)
|
|
|
|
|
2021-05-06 10:26:28 +02:00
|
|
|
class PN(db.Model):
|
|
|
|
code = db.Column(db.String(3), primary_key = True)
|
|
|
|
nom = db.Column(db.String(255))
|
|
|
|
diminutif = db.Column(db.String(30))
|
|
|
|
description = db.Column(db.Text())
|
2021-05-06 14:33:10 +02:00
|
|
|
type = db.Column(db.String(1))
|
2021-05-06 10:26:28 +02:00
|
|
|
|
|
|
|
def __repr__(self):
|
2021-05-06 14:33:10 +02:00
|
|
|
return "<PN {}>".format(self.code)
|
|
|
|
|
|
|
|
class AC(db.Model):
|
|
|
|
code = db.Column(db.String(6), primary_key = True)
|
|
|
|
titre = db.Column(db.String(255))
|
2021-05-10 12:43:45 +02:00
|
|
|
saes = db.relationship("SAE", secondary=SAEs_ACs, cascade="all, delete", lazy=False, backref=db.backref("acs", lazy=False))
|
|
|
|
ressources = db.relationship("Ressource", secondary=Ressources_ACs, cascade="all, delete", lazy=False, backref=db.backref("acs", lazy=False))
|
2021-05-06 14:33:10 +02:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return "<AC {}>".format(self.code)
|
|
|
|
|
|
|
|
class SAE(db.Model):
|
|
|
|
code = db.Column(db.String(5), primary_key = True)
|
|
|
|
titre = db.Column(db.String(255))
|
|
|
|
semestre = db.Column(db.String(255))
|
|
|
|
heures_encadrees = db.Column(db.String(3))
|
|
|
|
heures_tp = db.Column(db.String(3))
|
|
|
|
projet = db.Column(db.String(3))
|
|
|
|
description = db.Column(db.Text())
|
|
|
|
coef = db.Column(db.String(255))
|
2021-05-10 12:43:45 +02:00
|
|
|
ressources = db.relationship("Ressource", secondary=Ressources_SAEs, cascade="all, delete", lazy=False, backref=db.backref("saes", lazy=False))
|
2021-05-06 14:33:10 +02:00
|
|
|
livrables = db.Column(db.Text())
|
|
|
|
motscles = db.Column(db.String(255))
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return "<SAE {}>".format(self.code)
|
|
|
|
|
|
|
|
class Ressource(db.Model):
|
|
|
|
code = db.Column(db.String(4), primary_key = True)
|
|
|
|
nom = db.Column(db.String(255))
|
|
|
|
semestre = db.Column(db.String(255))
|
|
|
|
heures_formation = db.Column(db.String(3))
|
|
|
|
heures_tp = db.Column(db.String(3))
|
|
|
|
coef = db.Column(db.String(255))
|
|
|
|
prerequis = db.Column(db.String(255))
|
|
|
|
contexte = db.Column(db.Text())
|
|
|
|
contenu = db.Column(db.Text())
|
|
|
|
motscles = db.Column(db.String(255))
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return "<Ressource {}>".format(self.code)
|
|
|
|
|
|
|
|
class Competence(db.Model):
|
|
|
|
code = db.Column(db.String(3), primary_key = True)
|
|
|
|
nom = db.Column(db.String(255))
|
|
|
|
diminutif = db.Column(db.String(30))
|
|
|
|
description = db.Column(db.Text())
|
|
|
|
composantes = db.Column(db.Text())
|
|
|
|
situations = db.Column(db.Text())
|
|
|
|
niveaux = db.Column(db.Text())
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return "<Compétence {}>".format(self.code)
|