initial rcr platform commit
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user