2026-07-29 10:26:22 +00:00
# Generated by Django 5.2.13 on 2026-06-16 11:06
2026-04-30 13:28:57 +02:00
import django . db . models . deletion
from django . db import migrations , models
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
]
operations = [
migrations . CreateModel (
name = ' ActiviteProjet ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' titre ' , models . CharField ( max_length = 200 , verbose_name = " Titre de l ' activité " ) ) ,
( ' description ' , models . TextField ( blank = True , null = True , verbose_name = " Description de l ' activité " ) ) ,
( ' date_debut ' , models . DateField ( verbose_name = ' Date de début ' ) ) ,
( ' date_fin ' , models . DateField ( verbose_name = ' Date de fin ' ) ) ,
( ' annuler ' , models . BooleanField ( default = False , verbose_name = " Annuler l ' activité " ) ) ,
( ' motif_annulation ' , models . TextField ( blank = True , null = True , verbose_name = " Motif d ' annulation " ) ) ,
( ' motif_changement_budget ' , models . TextField ( blank = True , null = True , verbose_name = ' Motif de changement de budget ' ) ) ,
( ' budget_prevu ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 15 , verbose_name = ' Budget prévu ' ) ) ,
( ' budget_depense ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 15 , verbose_name = ' Budget dépensé ' ) ) ,
( ' besoin_ressource_materielle ' , models . TextField ( verbose_name = ' Besoin de ressources matérielles ' ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' Bailleur ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' nom_organisme ' , models . CharField ( max_length = 200 , unique = True ) ) ,
( ' contact ' , models . CharField ( blank = True , max_length = 100 , null = True ) ) ,
( ' email ' , models . EmailField ( blank = True , max_length = 254 , null = True ) ) ,
( ' pays ' , models . CharField ( blank = True , max_length = 100 , null = True ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' DomaineDeRecherche ' ,
fields = [
( ' nom ' , models . CharField ( choices = [ ( ' sciences_sociales ' , ' Sciences sociales ' ) , ( ' naturelles ' , ' Naturelles ' ) , ( ' humaines ' , ' Humaines ' ) , ( ' veterinaires ' , ' Vétérinaires ' ) ] , max_length = 100 , primary_key = True , serialize = False , verbose_name = ' Domaine de recherche ' ) ) ,
] ,
options = {
' verbose_name ' : ' Domaine de recherche ' ,
' verbose_name_plural ' : ' Domaines de recherche ' ,
} ,
) ,
migrations . CreateModel (
name = ' LivrablesLivres ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' nom ' , models . CharField ( max_length = 255 , verbose_name = ' Nom du livrable ' ) ) ,
( ' fichier ' , models . FileField ( blank = True , null = True , upload_to = ' fichier_livrables/ ' ) ) ,
( ' activite ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' gestion_projet.activiteprojet ' ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' Projet ' ,
fields = [
( ' id_projet ' , models . CharField ( blank = True , max_length = 100 , primary_key = True , serialize = False , unique = True , verbose_name = ' ID du projet ' ) ) ,
( ' nom_projet ' , models . CharField ( max_length = 200 , verbose_name = ' Nom du projet ' ) ) ,
( ' date_debut ' , models . DateField ( verbose_name = ' Date de début ' ) ) ,
( ' date_fin ' , models . DateField ( verbose_name = ' Date de fin ' ) ) ,
( ' numero_convention ' , models . CharField ( max_length = 100 , verbose_name = ' Numéro de convention ' ) ) ,
( ' description ' , models . TextField ( verbose_name = ' Description ' ) ) ,
( ' type_projet ' , models . CharField ( choices = [ ( ' laboratoire ' , ' Laboratoire ' ) , ( ' épidémiologie ' , ' Épidémiologie ' ) , ( ' sciences sociales ' , ' Sciences sociales ' ) , ( ' cliniques ' , ' Cliniques ' ) , ( ' autre ' , ' Autre ' ) ] , default = ' épidémiologie ' , max_length = 100 , verbose_name = ' Type de projet ' ) ) ,
( ' budget ' , models . DecimalField ( decimal_places = 2 , max_digits = 12 , verbose_name = ' Budget ' ) ) ,
( ' budget_RH ' , models . DecimalField ( decimal_places = 2 , max_digits = 12 , verbose_name = ' Budget RH ' ) ) ,
( ' created_at ' , models . DateTimeField ( auto_now_add = True ) ) ,
( ' bailleur ' , models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . SET_NULL , to = ' gestion_projet.bailleur ' , verbose_name = ' Bailleur de fonds ' ) ) ,
( ' domaine_recherche ' , models . ManyToManyField ( to = ' gestion_projet.domainederecherche ' ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' DocumentProjet ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' date_ajout ' , models . DateTimeField ( auto_now_add = True , verbose_name = " Date d ' ajout " ) ) ,
( ' nom_document ' , models . CharField ( choices = [ ( ' protocole ' , ' Protocole d’ étude ' ) , ( ' ethique ' , " Approbation du comité d ' éthique " ) , ( ' autorisation ' , ' Autorisation (DNLP) ' ) , ( ' rapport_technique ' , ' Rapport technique ' ) , ( ' rapport_financier ' , ' Rapport financier ' ) , ( ' rapport_avancement ' , " Rapport d ' avancement " ) , ( ' convention ' , ' Convention ' ) , ( ' rapport_final ' , ' Rapport final ' ) , ( ' autre ' , ' Autre ' ) ] , max_length = 100 , verbose_name = ' Type de document ' ) ) ,
( ' description ' , models . TextField ( blank = True , verbose_name = ' Description ' ) ) ,
( ' numero ' , models . CharField ( blank = True , max_length = 100 , null = True , verbose_name = ' Numéro du document ' ) ) ,
( ' date_validite ' , models . DateField ( blank = True , null = True , verbose_name = ' Date de validité ' ) ) ,
( ' fichier ' , models . FileField ( upload_to = ' documents_projets/ ' , verbose_name = ' Fichier à télécharger ' ) ) ,
( ' projet ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , related_name = ' documents ' , to = ' gestion_projet.projet ' , verbose_name = ' Projet ' ) ) ,
] ,
) ,
migrations . AddField (
model_name = ' activiteprojet ' ,
name = ' projet ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' gestion_projet.projet ' , verbose_name = ' Projet ' ) ,
) ,
migrations . CreateModel (
name = ' FinancementProjet ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' pourcentage ' , models . DecimalField ( decimal_places = 2 , max_digits = 5 ) ) ,
( ' bailleur ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' gestion_projet.bailleur ' ) ) ,
( ' projet ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' gestion_projet.projet ' ) ) ,
] ,
options = {
' unique_together ' : { ( ' projet ' , ' bailleur ' ) } ,
} ,
) ,
]