diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/models.py | 16 |
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): """ |