diff options
| author | 2019-01-22 23:30:15 +0100 | |
|---|---|---|
| committer | 2019-01-22 23:30:15 +0100 | |
| commit | 475b3bcd51d5e016dcc3830d49000dda852264a7 (patch) | |
| tree | db1d6761af3e4939746a037c482c22b22e09dd15 /api/migrations | |
| parent | Chonk down horrible JOIN performance. (diff) | |
Add an API endpoint for reminders.
Diffstat (limited to 'api/migrations')
| -rw-r--r-- | api/migrations/0030_reminder.py | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/api/migrations/0030_reminder.py b/api/migrations/0030_reminder.py new file mode 100644 index 00000000..f0c14ccb --- /dev/null +++ b/api/migrations/0030_reminder.py @@ -0,0 +1,28 @@ +# Generated by Django 2.1.5 on 2019-01-22 22:17 + +import api.models +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('api', '0029_add_infraction_type_watch'), +    ] + +    operations = [ +        migrations.CreateModel( +            name='Reminder', +            fields=[ +                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +                ('active', models.BooleanField(default=True, help_text='Whether this reminder is still active. If not, it has been sent out to the user.')), +                ('channel_id', models.BigIntegerField(help_text='The channel ID that this message was sent in, taken from Discord.', validators=[django.core.validators.MinValueValidator(limit_value=0, message='Channel IDs cannot be negative.')])), +                ('content', models.CharField(help_text='The content that the user wants to be reminded of.', max_length=1500)), +                ('expiration', models.DateTimeField(help_text='When this reminder should be sent.')), +                ('author', models.ForeignKey(help_text='The creator of this reminder.', on_delete=django.db.models.deletion.CASCADE, to='api.User')), +            ], +            bases=(api.models.ModelReprMixin, models.Model), +        ), +    ] | 
