countdown: fields for sending reminders

extending countdown items in order to have them also store reminders,
which are the same idea (an event at a time) but these are watched by
the irc bot and sent to the specified destination when the time is
reached

this adds support for configuring this, code in support of it is coming
in later commits

bss/dr.botzo#11
This commit is contained in:
Brian S. Stephan 2017-02-22 20:32:05 -06:00
parent 0666fe27e0
commit c81d0519a0
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-23 02:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('countdown', '0002_remove_countdownitem_source'),
]
operations = [
migrations.AddField(
model_name='countdownitem',
name='is_reminder',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='countdownitem',
name='reminder_message',
field=models.TextField(default=''),
),
migrations.AddField(
model_name='countdownitem',
name='reminder_target',
field=models.CharField(default='', max_length=64),
),
migrations.AddField(
model_name='countdownitem',
name='sent_reminder',
field=models.BooleanField(default=False),
),
]

View File

@ -16,6 +16,12 @@ class CountdownItem(models.Model):
name = models.CharField(max_length=64, default='')
at_time = models.DateTimeField()
is_reminder = models.BooleanField(default=False)
sent_reminder = models.BooleanField(default=False)
reminder_message = models.TextField(default="")
reminder_target = models.CharField(max_length=64, default='')
created_time = models.DateTimeField(auto_now_add=True)
def __str__(self):