2021-08-07 15:20:30 +02:00
|
|
|
# -*- coding: UTF-8 -*
|
|
|
|
|
|
|
|
"""Modèles base de données ScoDoc
|
|
|
|
"""
|
|
|
|
|
2022-07-05 16:09:26 +02:00
|
|
|
import sqlalchemy
|
|
|
|
|
2021-08-07 15:20:30 +02:00
|
|
|
CODE_STR_LEN = 16 # chaine pour les codes
|
|
|
|
SHORT_STR_LEN = 32 # courtes chaine, eg acronymes
|
2022-01-19 23:02:15 +01:00
|
|
|
APO_CODE_STR_LEN = 512 # nb de car max d'un code Apogée (il peut y en avoir plusieurs)
|
2021-08-14 18:54:32 +02:00
|
|
|
GROUPNAME_STR_LEN = 64
|
2021-08-07 15:20:30 +02:00
|
|
|
|
2022-07-05 16:09:26 +02:00
|
|
|
convention = {
|
|
|
|
"ix": "ix_%(column_0_label)s",
|
|
|
|
"uq": "uq_%(table_name)s_%(column_0_name)s",
|
|
|
|
"ck": "ck_%(table_name)s_%(constraint_name)s",
|
|
|
|
"fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
|
|
|
|
"pk": "pk_%(table_name)s",
|
|
|
|
}
|
|
|
|
|
|
|
|
metadata_obj = sqlalchemy.MetaData(naming_convention=convention)
|
|
|
|
|
2021-08-09 23:23:11 +02:00
|
|
|
from app.models.raw_sql_init import create_database_functions
|
2021-08-09 17:01:47 +02:00
|
|
|
|
2021-08-07 15:20:30 +02:00
|
|
|
from app.models.absences import Absence, AbsenceNotification, BilletAbsence
|
2021-08-13 00:34:58 +02:00
|
|
|
from app.models.departements import Departement
|
2021-08-07 15:20:30 +02:00
|
|
|
from app.models.etudiants import (
|
|
|
|
Identite,
|
|
|
|
Adresse,
|
|
|
|
Admission,
|
|
|
|
ItemSuivi,
|
|
|
|
ItemSuiviTag,
|
2021-08-14 18:54:32 +02:00
|
|
|
itemsuivi_tags_assoc,
|
2021-08-07 15:20:30 +02:00
|
|
|
EtudAnnotation,
|
|
|
|
)
|
|
|
|
from app.models.events import Scolog, ScolarNews
|
2021-12-08 22:33:32 +01:00
|
|
|
from app.models.formations import Formation, Matiere
|
2021-12-14 10:31:33 +01:00
|
|
|
from app.models.modules import Module, ModuleUECoef, NotesTag, notes_modules_tags
|
2021-12-08 22:33:32 +01:00
|
|
|
from app.models.ues import UniteEns
|
2021-08-07 15:20:30 +02:00
|
|
|
from app.models.formsemestre import (
|
|
|
|
FormSemestre,
|
2021-12-20 20:38:21 +01:00
|
|
|
FormSemestreEtape,
|
2021-11-12 22:17:46 +01:00
|
|
|
FormationModalite,
|
2021-12-20 20:38:21 +01:00
|
|
|
FormSemestreUECoef,
|
|
|
|
FormSemestreUEComputationExpr,
|
|
|
|
FormSemestreCustomMenu,
|
|
|
|
FormSemestreInscription,
|
2021-08-14 18:54:32 +02:00
|
|
|
notes_formsemestre_responsables,
|
2021-11-13 08:25:51 +01:00
|
|
|
NotesSemSet,
|
|
|
|
notes_semset_formsemestre,
|
|
|
|
)
|
|
|
|
from app.models.moduleimpls import (
|
2021-11-12 22:17:46 +01:00
|
|
|
ModuleImpl,
|
2021-08-07 15:20:30 +02:00
|
|
|
notes_modules_enseignants,
|
2021-11-12 22:17:46 +01:00
|
|
|
ModuleImplInscription,
|
2021-11-13 08:25:51 +01:00
|
|
|
)
|
|
|
|
from app.models.evaluations import (
|
2021-11-12 22:17:46 +01:00
|
|
|
Evaluation,
|
2021-11-08 19:44:25 +01:00
|
|
|
EvaluationUEPoids,
|
2021-08-07 15:20:30 +02:00
|
|
|
)
|
|
|
|
from app.models.groups import Partition, GroupDescr, group_membership
|
|
|
|
from app.models.notes import (
|
2021-11-12 22:17:46 +01:00
|
|
|
BulAppreciations,
|
2021-08-07 15:20:30 +02:00
|
|
|
NotesNotes,
|
|
|
|
NotesNotesLog,
|
|
|
|
)
|
2022-02-06 16:09:17 +01:00
|
|
|
from app.models.validations import (
|
|
|
|
ScolarEvent,
|
|
|
|
ScolarFormSemestreValidation,
|
|
|
|
ScolarAutorisationInscription,
|
|
|
|
)
|
2022-01-21 00:46:45 +01:00
|
|
|
from app.models.preferences import ScoPreference
|
2021-12-02 12:08:03 +01:00
|
|
|
|
|
|
|
from app.models.but_refcomp import (
|
|
|
|
ApcReferentielCompetences,
|
|
|
|
ApcCompetence,
|
|
|
|
ApcSituationPro,
|
|
|
|
ApcAppCritique,
|
2022-07-05 16:09:26 +02:00
|
|
|
ApcParcours,
|
2021-12-02 12:08:03 +01:00
|
|
|
)
|
2022-07-05 16:09:26 +02:00
|
|
|
from app.models.but_validations import ApcValidationAnnee, ApcValidationRCUE
|
|
|
|
|
2022-01-25 22:18:49 +01:00
|
|
|
from app.models.config import ScoDocSiteConfig
|