Commit aa38d8f8 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

a few tweaks to the models

parent 29944bc2
...@@ -59,6 +59,7 @@ class CourseCollection(BaseModel): ...@@ -59,6 +59,7 @@ class CourseCollection(BaseModel):
# how many of those are required # how many of those are required
numReq = models.IntegerField() numReq = models.IntegerField()
# if the course collection's numreq is met
isCompleted = models.BooleanField(False) isCompleted = models.BooleanField(False)
class Program(BaseModel): class Program(BaseModel):
...@@ -72,8 +73,12 @@ class Program(BaseModel): ...@@ -72,8 +73,12 @@ class Program(BaseModel):
programType = models.CharField(max_length = 25) programType = models.CharField(max_length = 25)
# is BA, BS, Honors # is BA, BS, Honors
degreeType = models.CharField(max_length = 25) # all majors must take a gened program, null for minors, geneds
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
degreeType = models.ManyToManyField('Program', null=True)
# if all coursecollections' and gened requirements are satisfied, then the
# program is completed
isCompleted = models.BooleanField(False) isCompleted = models.BooleanField(False)
class Meta: class Meta:
...@@ -87,8 +92,10 @@ class Student(models.Model): ...@@ -87,8 +92,10 @@ class Student(models.Model):
user = models.OneToOneField(User) user = models.OneToOneField(User)
# the student's already-completed classes, the root of the trajectory tree
alreadyTaken = models.ManyToManyField('Course', null=True) alreadyTaken = models.ManyToManyField('Course', null=True)
# all of the student's trajectories
trajectory = models.ManyToManyField('Trajectory', null=True) trajectory = models.ManyToManyField('Trajectory', null=True)
# aka username, etc should all be here # aka username, etc should all be here
...@@ -115,6 +122,11 @@ class Trajectory(BaseModel): ...@@ -115,6 +122,11 @@ class Trajectory(BaseModel):
# Takes courses # Takes courses
previousCourses = models.ManyToManyField('Trajectory',) previousCourses = models.ManyToManyField('Trajectory',)
# the program(s) that this trajectory is completing
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
forPrograms = models.ManyToManyField('Program',)
# whether or not the trajectory can be seen by others
isPublic = models.BooleanField() isPublic = models.BooleanField()
# this isn't exactly done correctly-- ideally courses should be elements # this isn't exactly done correctly-- ideally courses should be elements
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment