IDDRS/App/models.py

45 lines
1.7 KiB
Python
Raw Normal View History

2022-06-17 12:06:51 +00:00
from enum import unique
from django.db import models
# Create your models here.
class Level(models.Model):
levelNumber = models.IntegerField()
levelName = models.CharField(max_length=200)
def __str__(self):
return str(self.levelNumber)
class Standards(models.Model):
standardLevel = models.IntegerField(blank=True, null=True)
standardTitle = models.CharField(max_length=200)
2022-07-25 10:03:35 +00:00
standardNumber = models.CharField(max_length=10)
2022-06-17 12:06:51 +00:00
standardPath = models.CharField(max_length=200,blank=True,null=True)
revision = models.BooleanField()
paragraph = models.TextField(blank=True,null=True)
levelID = models.ForeignKey(Level, on_delete=models.CASCADE, blank=True, null=True)
def __str__(self):
2022-07-25 10:03:35 +00:00
return self.standardNumber
2022-06-17 12:06:51 +00:00
class SearchResults(models.Model):
session_key = models.CharField(max_length=17,blank=True, null=True)
uniqueID = models.CharField(max_length=200,blank=True, null=True)
session_expiry_date = models.DateField(blank=True, null=True)
index = models.IntegerField(blank=True, null=True)
level = models.IntegerField(blank=True, null=True)
levelName = models.CharField(max_length=200)
title = models.CharField(max_length=200)
paragraph = models.TextField(blank=True,null=True)
color = models.CharField(max_length=10)
module = models.CharField(max_length=200)
heading1 = models.CharField(max_length=200)
heading2 = models.CharField(max_length=200)
heading3 = models.CharField(max_length=200)
heading4 = models.CharField(max_length=200)
pageNumber = models.IntegerField(blank=True, null=True)
sentence = models.CharField(max_length=500,blank=True,null=True)
def __str__(self):
return self.heading1