EditionPN/app/models.py

65 lines
2.0 KiB
Python
Raw Normal View History

2021-05-06 10:26:28 +02:00
from app import db
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())
type = db.Column(db.String(1))
2021-05-06 10:26:28 +02:00
def __repr__(self):
return "<PN {}>".format(self.code)
class AC(db.Model):
code = db.Column(db.String(6), primary_key = True)
titre = db.Column(db.String(255))
saes = db.Column(db.String(255))
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))
acs = db.Column(db.String(255))
ressources = db.Column(db.String(255))
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))
acs = db.Column(db.String(255))
saes = 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)