mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
fix: Correction dépendances circulaires
This commit is contained in:
13
Back-End/Common/models.py
Normal file
13
Back-End/Common/models.py
Normal file
@ -0,0 +1,13 @@
|
||||
from django.db import models
|
||||
|
||||
class StudentCompetency(models.Model):
|
||||
student = models.ForeignKey('Subscriptions.Student', on_delete=models.CASCADE, related_name='competency_scores')
|
||||
competency = models.ForeignKey('School.Competency', on_delete=models.CASCADE, related_name='student_scores')
|
||||
score = models.DecimalField(max_digits=5, decimal_places=2, null=True, blank=True)
|
||||
comment = models.TextField(blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('student', 'competency')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.student} - {self.competency.name} - Score: {self.score}"
|
||||
Reference in New Issue
Block a user