forked from ScoDoc/ScoDoc
Ajoute relations: inscriptions etuds
This commit is contained in:
parent
01ea6286ee
commit
e706407bcb
@ -16,6 +16,7 @@ import app.scodoc.notesdb as ndb
|
||||
from app.scodoc import sco_evaluation_db
|
||||
from app.models.formations import UniteEns, Module
|
||||
from app.models.moduleimpls import ModuleImpl
|
||||
from app.models.etudiants import Identite
|
||||
|
||||
|
||||
class FormSemestre(db.Model):
|
||||
@ -255,6 +256,14 @@ class FormsemestreInscription(db.Model):
|
||||
db.Integer,
|
||||
db.ForeignKey("notes_formsemestre.id"),
|
||||
)
|
||||
etud = db.relationship(
|
||||
Identite,
|
||||
backref=db.backref("formsemestre_inscriptions", cascade="all, delete-orphan"),
|
||||
)
|
||||
formsemestre = db.relationship(
|
||||
FormSemestre,
|
||||
backref=db.backref("inscriptions", cascade="all, delete-orphan"),
|
||||
)
|
||||
# I inscrit, D demission en cours de semestre, DEF si "defaillant"
|
||||
etat = db.Column(db.String(CODE_STR_LEN))
|
||||
# etape apogee d'inscription (experimental 2020)
|
||||
|
@ -8,7 +8,7 @@ from app import db
|
||||
from app.models import APO_CODE_STR_LEN
|
||||
from app.models import SHORT_STR_LEN
|
||||
from app.models import CODE_STR_LEN
|
||||
from app.models import UniteEns
|
||||
from app.models import UniteEns, Identite
|
||||
|
||||
import app.scodoc.notesdb as ndb
|
||||
from app.scodoc import sco_evaluation_db
|
||||
@ -64,3 +64,11 @@ class ModuleImplInscription(db.Model):
|
||||
index=True,
|
||||
)
|
||||
etudid = db.Column(db.Integer, db.ForeignKey("identite.id"), index=True)
|
||||
etud = db.relationship(
|
||||
Identite,
|
||||
backref=db.backref("moduleimpl_inscriptions", cascade="all, delete-orphan"),
|
||||
)
|
||||
moduleimpl = db.relationship(
|
||||
ModuleImpl,
|
||||
backref=db.backref("inscriptions", cascade="all, delete-orphan"),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user