justification embauche
[auf_rh_dae.git] / project / dae / models.py
index d235325..17e963d 100644 (file)
@@ -413,16 +413,27 @@ class Remuneration(models.Model):
         return round(self.montant_euro() / 12, 2)
 
 
-class JustificationEmploye(models.Model):
-    pass
-
+TYPE_JUSTIFICATIONS = (
+    ('N', 'Nouvel employé'),
+    ('R', 'Renouvellement employé'),
+)
 
-class DocumentPoste(models.Model):
-    pass
+class JustificationQuestion(models.Model):
+    question = models.CharField(max_length=255)
+    type = models.CharField(max_length=255, choices=TYPE_JUSTIFICATIONS)
+    
+    def __unicode__(self,):
+        return self.question
 
+class JustificationNouvelEmploye(models.Model):
+    dossier = models.ForeignKey("Dossier")
+    question = models.ForeignKey("JustificationQuestion")
+    reponse = models.TextField()
 
-class DocumentEmploye(models.Model):
-    pass
+class JustificationAutreEmploye(models.Model):
+    dossier = models.ForeignKey("Dossier")
+    question = models.ForeignKey("JustificationQuestion")
+    reponse = models.TextField()
 
 
 class Validation(models.Model):