aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-11 10:54:15 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-11 10:54:15 +0100
commit5150b4e0847f5edf15ef2fd6b42b3ca6b55bc6fa (patch)
treed43e8a0654ebadc111bd4f2e215a5f16dfe2ac5d /ctrack/register/models.py
parentc7e1faecabf81cbabf0241a226624c8ed562c98c (diff)
started new event design - added enum for event type
Diffstat (limited to '')
-rw-r--r--ctrack/register/models.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ctrack/register/models.py b/ctrack/register/models.py
index 7e6d46e..8155fb7 100644
--- a/ctrack/register/models.py
+++ b/ctrack/register/models.py
@@ -1,5 +1,6 @@
import datetime
from datetime import date as std_date
+from enum import Enum, auto
from typing import Optional, Dict
from django.contrib.auth import get_user_model
@@ -9,6 +10,20 @@ from ctrack.organisations.models import Person
from ctrack.users.models import User
+class EventType(Enum):
+ MEETING = auto()
+ PHONE_CALL = auto()
+ VIDEO_CALL = auto()
+ CAF_INITIAL_CAF_RECEIVED = auto()
+ CAF_INITIAL_CAF_EMAILED_ROSA = auto()
+ CAF_FEEDBACK_EMAILED_OES = auto()
+ CAF_RECEIVED = auto()
+ CAF_EMAILED_ROSA = auto()
+ CAF_PEER_REVIEW_PERIOD = auto()
+ CAF_VALIDATION_PERIOD = auto()
+ CAF_VALIDATION_SIGN_OFF = auto()
+ CAF_VALIDATION_RECORD_EMAILED_TO_OES = auto()
+
def _style_descriptor(days: int) -> str:
if days < 1:
return "red"
@@ -34,6 +49,7 @@ class AuditableEventBase(models.Model):
abstract = True
def save(self, *args, **kwargs):
+ # TODO this also needs to include created_by and updated_by attributes
"""Overriding so we can save the dates in here."""
if not self.pk:
self.created_date = datetime.datetime.now()