aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/models.py')
-rw-r--r--api/models.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/api/models.py b/api/models.py
index 3ba0ac5c..bb3489d0 100644
--- a/api/models.py
+++ b/api/models.py
@@ -241,6 +241,25 @@ class Message(ModelReprMixin, models.Model):
abstract = True
+class MessageDeletionContext(ModelReprMixin, models.Model):
+ actor = models.ForeignKey(
+ Member,
+ on_delete=models.CASCADE,
+ help_text=(
+ "The original actor causing this deletion. Could be the author "
+ "of a manual clean command invocation, the bot when executing "
+ "automatic actions, or nothing to indicate that the bulk "
+ "deletion was not issued by us."
+ ),
+ null=True
+ )
+ creation = models.DateTimeField(
+ # Consider whether we want to add a validator here that ensures
+ # the deletion context does not take place in the future.
+ help_text="When this deletion took place."
+ )
+
+
class Tag(ModelReprMixin, models.Model):
"""A tag providing (hopefully) useful information."""