Skip to content

Commit

Permalink
Add MajorGraduationRequirement model (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrasshopperBears authored and sboh1214 committed May 7, 2023
1 parent 376d551 commit 86f404b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion apps/planner/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
from django.db import models
from django.core.validators import MinValueValidator, MaxValueValidator

# Create your models here.
from apps.subject.models import Department

class MajorGraduationRequirement(models.Model):
class MajorType(models.TextChoices):
MAJOR = "major" # 주전공
DOUBLE_MAJOR = "double_major" # 복수전공
MINOR = "minor" # 부전공
SPECIALIZED_MAJOR = "specialized_major" # 심화전공
SELF_DESIGNED_MAJRO = "self_designed_major" # 융합전공

department = models.ForeignKey(Department)
entrance_from = models.IntegerField(validators=[MinValueValidator(1900), MaxValueValidator(9999)])
entrance_to = models.IntegerField(validators=[MinValueValidator(1900), MaxValueValidator(9999)])
major_type = models.CharField(choices=MajorType.choices)
mandatory_major = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(200)])
elective_major = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(200)])
elective_basic = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(200)])

0 comments on commit 86f404b

Please sign in to comment.