diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-10 12:34:49 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-10 12:34:49 +0100 |
commit | c4fd33fce3dbef280657c150a7658462c80da877 (patch) | |
tree | cb366d210edc4bd8d40ea8e6f3af3e1cdd59d6b8 /engagements/models.py | |
parent | 5fb0621c53967bf24f4411f579712223e96b296a (diff) |
wip: implementing EngagementStrategy
Diffstat (limited to '')
-rw-r--r-- | engagements/models.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/engagements/models.py b/engagements/models.py index ef0aee3..8876d91 100644 --- a/engagements/models.py +++ b/engagements/models.py @@ -255,9 +255,19 @@ class RegulatoryCycle(Common): return f"Regulatory Cycle: {self.get_year()}" -# class EngagementStrategy(Common): -# name = models.CharField(max_length=128, null=False, blank=False) -# start_date = models.DateField(null=False, blank=False) -# end_date -# description = models.TextField(max_length=1024) -# engagement = models.ForeignKey(Engagement, on_delete=models.CASCADE) +class EngagementStrategy(Common): + STATUS = ( + ("DRAFT", "Draft"), + ("SUBMITTED", "Submitted"), + ("APPROVED", "Approved"), + ("REJECTED", "Rejected"), + ) + + name = models.CharField(max_length=128, null=False, blank=False) + organisation = models.ForeignKey(Organisation, on_delete=models.CASCADE) + start_year = models.ForeignKey(RegulatoryCycle, on_delete=models.CASCADE, related_name="start_year") + end_year = models.ForeignKey(RegulatoryCycle, on_delete=models.CASCADE, related_name="end_year") + description = models.TextField(max_length=1024) + inspector_sign_off = models.DateField(null=True, blank=True) + management_sign_off = models.DateField(null=True, blank=True) + status = models.CharField(max_length=32, choices=STATUS, default=STATUS[0][0]) |