aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-14 17:01:22 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-14 17:01:22 +0100
commit14fa59eee9ba35ad462b5b17229a09164f5d716d (patch)
tree1223522b7cc30cf57ad8ec66e50c5081727fe3d4 /ctrack/register/models.py
parentbc4edc69407f20da32a48d534b3d725cc3818c1a (diff)
about to nuke migrations
Diffstat (limited to '')
-rw-r--r--ctrack/register/models.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ctrack/register/models.py b/ctrack/register/models.py
index 2729fa5..4687a91 100644
--- a/ctrack/register/models.py
+++ b/ctrack/register/models.py
@@ -16,6 +16,7 @@ class EventType(Enum):
MEETING = auto()
PHONE_CALL = auto()
VIDEO_CALL = auto()
+ EMAIL = auto()
# single date caf events
CAF_INITIAL_CAF_RECEIVED = auto()
CAF_FEEDBACK_EMAILED_OES = auto()
@@ -118,12 +119,24 @@ class TwinDateMixin(models.Model):
class CAFMixin(models.Model):
related_caf = models.ForeignKey(CAF, on_delete=models.CASCADE, blank=False)
+ class Meta:
+ abstract = True
+
-class SingleDateTimeEvent(EventBase, ThirdPartyEventMixin, SingleDateTimeEventMixin):
+class ResponseRequiredMixin(models.Model):
+ requested_response_date = models.DateField(blank=True, null=True, help_text="DD/MM/YY format")
+ response_received_date = models.DateField(blank=True, null=True, help_text="DD/MM/YY format")
+
+ class Meta:
+ abstract = True
+
+
+class SingleDateTimeEvent(EventBase, ResponseRequiredMixin, ThirdPartyEventMixin, SingleDateTimeEventMixin):
AVAILABLE_TYPES = [
(EventType.MEETING.name, "Meeting"),
(EventType.PHONE_CALL.name, "Phone Call"),
(EventType.VIDEO_CALL.name, "Video Call"),
+ (EventType.EMAIL.name, "Email")
]
type_descriptor = models.CharField(
blank=False, max_length=50, choices=AVAILABLE_TYPES
@@ -184,6 +197,7 @@ class CAFTwinDateEvent(EventBase, CAFMixin, TwinDateMixin):
)
]
+
# OLD CODE BELOW
class EngagementType(models.Model):
"""