From 2001d123aa96bc5b7f07f5be48e4e8a32372c480 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Sun, 18 Nov 2018 21:19:42 +0100 Subject: Add the `channel_id` field to messages. --- api/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'api/models.py') diff --git a/api/models.py b/api/models.py index bb3489d0..abbaa8bc 100644 --- a/api/models.py +++ b/api/models.py @@ -226,6 +226,18 @@ class Message(ModelReprMixin, models.Model): on_delete=models.CASCADE, help_text="The author of this message." ) + channel_id = models.BigInteger( + help_text=( + "The channel ID that this message was " + "sent in, taken from Discord." + ), + validators=( + MinValueValidator( + limit_value=0, + message="Channel IDs cannot be negative." + ), + ) + ) content = models.CharField( max_length=2_000, help_text="The content of this message, taken from Discord." -- cgit v1.2.3