aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyblackbird_cc/resources/models.py')
-rw-r--r--pyblackbird_cc/resources/models.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/pyblackbird_cc/resources/models.py b/pyblackbird_cc/resources/models.py
index d302ae6..a03992b 100644
--- a/pyblackbird_cc/resources/models.py
+++ b/pyblackbird_cc/resources/models.py
@@ -46,7 +46,7 @@ class Resource(models.Model):
related_name="main_resource_category",
)
additional_resource_category = models.ManyToManyField(
- "ResourceCategory",
+ "ResourceSubcategory",
null=True,
blank=True,
related_name="additional_resource_category",
@@ -105,6 +105,21 @@ class ResourceType(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
+ class Meta:
+ verbose_name_plural = "Resource Types"
+
+ def __str__(self):
+ return self.name
+
+
+class ResourceSubcategory(models.Model):
+ name = models.CharField(max_length=255, null=False)
+ created_at = models.DateTimeField(auto_now_add=True)
+ updated_at = models.DateTimeField(auto_now=True)
+
+ class Meta:
+ verbose_name_plural = "Resource Subcategories"
+
def __str__(self):
return self.name