mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
14 lines
613 B
Python
14 lines
613 B
Python
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}"
|