This commit is contained in:
2022-11-08 21:19:51 +01:00
commit 4c456eafc3
160 changed files with 21472 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
from django.db import models
from .domaine import Domaine
from .filiere import Filiere
class Competence(models.Model):
"""Modèle Compétences"""
class Cols():
""" Constantes pour les noms de colonnes """
PK = 'comp_id'
CATEGORIE = 'comp_categorie'
LIBELLE = 'comp_libelle'
# relations one-to-one ou many-to-one
REL_DOMAINE = 'comp_domaine'
REL_FILIERE = 'comp_filiere'
comp_id = models.CharField('ID', primary_key=True, max_length=100)
comp_libelle = models.CharField('libellé', null=True, blank=True, max_length=100)
comp_domaine = models.ForeignKey(Domaine, on_delete=models.SET_NULL, null=True, blank=True, verbose_name='domaine')
comp_filiere = models.ForeignKey(Filiere, on_delete=models.SET_NULL, null=True, blank=True, verbose_name='filière')
comp_categorie = models.CharField('catégorie', max_length=100, null=True, blank=True)
def as_dict(self):
return {
"id": self.comp_id,
"libelle": self.comp_libelle,
}