mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
29 lines
922 B
Python
29 lines
922 B
Python
from django.db import models
|
|
from accounts.models import CustomUser
|
|
|
|
# Create your models here.
|
|
|
|
|
|
class StudentStatus(models.Model):
|
|
YEAR_LEVELS = (
|
|
('1st', '1st year'),
|
|
('2nd', '2nd year'),
|
|
('3rd', '3rd year'),
|
|
('4th', '4th year'),
|
|
('5th', '5th Year'),
|
|
('Irreg', 'Irregular'),
|
|
)
|
|
SEMESTERS = (
|
|
('1st', '1st semester'),
|
|
('2nd', '2nd semester'),
|
|
)
|
|
user = models.OneToOneField(
|
|
CustomUser, on_delete=models.CASCADE, primary_key=True)
|
|
x = models.FloatField(null=True)
|
|
y = models.FloatField(null=True)
|
|
subject = models.CharField(max_length=100, null=True)
|
|
year_level = models.CharField(
|
|
max_length=50, choices=CustomUser.YEAR_LEVELS)
|
|
semester = models.CharField(max_length=50, choices=CustomUser.SEMESTERS)
|
|
active = models.BooleanField(default=False)
|
|
timestamp = models.DateField(auto_now_add=True)
|