Coverage for app/models/individualRequirement.py: 100%
18 statements
« prev ^ index » next coverage.py v7.2.7, created at 2024-07-24 12:19 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2024-07-24 12:19 +0000
1from datetime import datetime
3from app.models import*
4from app.models.user import User
5from app.models.term import Term
6from app.models.course import Course
7from app.models.program import Program
8from app.models.certificationRequirement import CertificationRequirement
11class IndividualRequirement(baseModel):
12 program = ForeignKeyField(Program, null = True)
13 course = ForeignKeyField(Course, null = True)
14 description = CharField(null = True)
15 username = ForeignKeyField(User)
16 term = ForeignKeyField(Term, null = True)
17 requirement = ForeignKeyField(CertificationRequirement)
18 addedBy = ForeignKeyField(User)
19 addedOn = DateTimeField(default=datetime.now)
21 class Meta:
22 constraints = [SQL('UNIQUE (username_id, requirement_id)')]