45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
|
|
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)
|
|
standardNumber = models.CharField(max_length=10)
|
|
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):
|
|
return self.standardNumber
|
|
|
|
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 |