aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/models.py')
-rw-r--r--api/models.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/api/models.py b/api/models.py
index 5ca274ce..fa68f31c 100644
--- a/api/models.py
+++ b/api/models.py
@@ -408,3 +408,32 @@ class Reminder(ModelReprMixin, models.Model):
def __str__(self):
return f"{self.content} on {self.expiration} by {self.author}"
+
+
+class Nomination(ModelReprMixin, models.Model):
+ """A helper nomination created by staff."""
+
+ active = models.BooleanField(
+ default=True,
+ help_text="Whether this nomination is still relevant."
+ )
+ author = models.ForeignKey(
+ User,
+ on_delete=models.CASCADE,
+ help_text="The staff member that nominated this user.",
+ related_name='nomination_set'
+ )
+ reason = models.TextField(
+ help_text="Why this user was nominated."
+ )
+ user = models.OneToOneField(
+ User,
+ on_delete=models.CASCADE,
+ help_text="The nominated user.",
+ primary_key=True,
+ related_name='nomination'
+ )
+ inserted_at = models.DateTimeField(
+ auto_now_add=True,
+ help_text="The creation date of this nomination."
+ )