From dc6790ce9eff543d5095635cc23dfce48f73b967 Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Tue, 23 Nov 2021 17:24:38 +0900 Subject: [PATCH] Add RecognizedCourse model (#878) --- apps/planner/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/planner/models.py b/apps/planner/models.py index 3089c3299..2684e702e 100644 --- a/apps/planner/models.py +++ b/apps/planner/models.py @@ -1,7 +1,7 @@ from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator -from apps.subject.models import Department +from apps.subject.models import Department, Course class MajorGraduationRequirement(models.Model): class MajorType(models.TextChoices): @@ -18,3 +18,8 @@ class MajorType(models.TextChoices): 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)]) + + +class RecognizedCourse(models.Model): + original_course = models.ForeignKey(Course, related_name="recognized_course_original_course") + recognized_course = models.ForeignKey(Course, related_name="recognized_course_recognized_course")