# Django
from django.db import models

# Local
from .constants import LEVELS_VALUES
from .constants import TIME_COURSE_VALUES

class Student(models.Model):
    name = models.TextField(max_length=255)
    rg = models.CharField(max_length=9)
    cpf = models.CharField(max_length=11)
    birth_date = models.DateField()

    def __str__(self) -> str:
        return self.name


class Course(models.Model):
    name = models.TextField(max_length=255)
    code = models.CharField(max_length=100)
    description = models.CharField(max_length=255)
    level = models.IntegerField(choices=LEVELS_VALUES)

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) -> str:
        return self.student.name

dda17d5b49c3b181fcc1ab84e2ae718e804a26ec
<mask token>


class Course(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) ->str:
        return self.student.name

<mask token>


class Student(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self) ->str:
        return self.name


class Course(models.Model):
    name = models.TextField(max_length=255)
    code = models.CharField(max_length=100)
    description = models.CharField(max_length=255)
    level = models.IntegerField(choices=LEVELS_VALUES)

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) ->str:
        return self.student.name

<mask token>


class Student(models.Model):
    name = models.TextField(max_length=255)
    rg = models.CharField(max_length=9)
    cpf = models.CharField(max_length=11)
    birth_date = models.DateField()

    def __str__(self) ->str:
        return self.name


class Course(models.Model):
    name = models.TextField(max_length=255)
    code = models.CharField(max_length=100)
    description = models.CharField(max_length=255)
    level = models.IntegerField(choices=LEVELS_VALUES)

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) ->str:
        return self.student.name

from django.db import models
from .constants import LEVELS_VALUES
from .constants import TIME_COURSE_VALUES


class Student(models.Model):
    name = models.TextField(max_length=255)
    rg = models.CharField(max_length=9)
    cpf = models.CharField(max_length=11)
    birth_date = models.DateField()

    def __str__(self) ->str:
        return self.name


class Course(models.Model):
    name = models.TextField(max_length=255)
    code = models.CharField(max_length=100)
    description = models.CharField(max_length=255)
    level = models.IntegerField(choices=LEVELS_VALUES)

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) ->str:
        return self.student.name

# Django
from django.db import models

# Local
from .constants import LEVELS_VALUES
from .constants import TIME_COURSE_VALUES

class Student(models.Model):
    name = models.TextField(max_length=255)
    rg = models.CharField(max_length=9)
    cpf = models.CharField(max_length=11)
    birth_date = models.DateField()

    def __str__(self) -> str:
        return self.name


class Course(models.Model):
    name = models.TextField(max_length=255)
    code = models.CharField(max_length=100)
    description = models.CharField(max_length=255)
    level = models.IntegerField(choices=LEVELS_VALUES)

    def __str__(self):
        return self.name


class Registration(models.Model):
    student = models.ForeignKey(Student, on_delete=models.CASCADE)
    course = models.ForeignKey(Course, on_delete=models.CASCADE)
    time_course = models.IntegerField(choices=TIME_COURSE_VALUES)

    def __str__(self) -> str:
        return self.student.name
