aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-02-17 20:55:54 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-02-17 20:55:54 +0000
commit7b6de8f88d2673ffdd61dc8cc7f1fca754c8cf88 (patch)
tree6ac039c2b4237ae7c1e9a5cee5213489e518b76d /ctrack/organisations/models.py
parent05d56d5033fd65eb12c18d0497b1a8cddeda0cb1 (diff)
added active, comments, updated_by fields to organisation
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/models.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py
index 5493f06..7e4c624 100644
--- a/ctrack/organisations/models.py
+++ b/ctrack/organisations/models.py
@@ -1,7 +1,9 @@
from django.db import models
-# Create your models here.
+from django.contrib.auth import get_user_model
+
from django.urls import reverse
+from django.conf import settings
from django_extensions.db.fields import AutoSlugField
from slugify import slugify
@@ -68,6 +70,10 @@ class Organisation(models.Model):
designation_type = models.IntegerField(choices=DESIGNATION_TYPE, default=1)
registered_company_name = models.CharField(max_length=255, blank=True)
registered_company_number = models.CharField(max_length=100, blank=True)
+ date_updated = models.DateField(auto_now=True)
+ updated_by = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
+ comments = models.TextField(max_length=500)
+ active = models.BooleanField(default=True)
def get_absolute_url(self):
return reverse("organisations:detail", kwargs={"slug": self.slug})