courseFeedback.py 819 Bytes
Newer Older
1
from django.core.validators import MaxValueValidator, MinValueValidator
2
from django.db import models
3

4 5
from backend_app.models.abstract.essentialModule import EssentialModule
from backend_app.models.course import Course
6 7 8


class CourseFeedback(EssentialModule):
9 10 11
    course = models.OneToOneField(
        Course, on_delete=models.CASCADE, default=0, related_name="course_feedback"
    )
12 13
    comment = models.TextField(null=True, max_length=1500)
    adequation = models.IntegerField(
14
        default=0, validators=[MaxValueValidator(5), MinValueValidator(-5)]
15 16
    )
    working_dose = models.IntegerField(
17
        default=0, validators=[MaxValueValidator(5), MinValueValidator(-5)]
18 19
    )
    language_following_ease = models.IntegerField(
20
        default=0, validators=[MaxValueValidator(5), MinValueValidator(-5)]
21
    )