initial rcr platform commit

This commit is contained in:
Ross
2023-11-06 09:08:50 +00:00
parent 0d852bc752
commit bbcfe7d80c
16 changed files with 361 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
# Create your models here.
class Item(models.Model):
class LevelChoices(models.TextChoices):
NONE = "", _("None")
PART_1 = "P1", _("FRCR Part 1")
PART_2 = "P2", _("FRCR Part 2")
POST_GEN = "GEN", _("Post FRCR Generalist")
POST_SPEC = "SPEC", _("Post FRCR Specialist")
name = models.CharField(max_length=200)
rcr_platform_id = models.CharField(max_length=255)
category = models.ForeignKey("Category", on_delete=models.SET_NULL, null=True, blank=True)
level = models.ManyToManyField("Level", blank=True)
completed = models.BooleanField(default=False)
def __str__(self):
return self.name
class Category(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Level(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name