# Generated by Django 2.1.10 on 2019-08-21 07:29

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0051_auto_20190730_0947'),
    ]

    operations = [
        migrations.CreateModel(
            name='Notifications',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='A string label for the notification', max_length=50)),
                ('body', models.TextField(help_text='further details about a notification')),
                ('level', models.CharField(choices=[('success', 'success'), ('warning', 'warning'), ('information', 'information')], default='information', help_text='severity level of a notification', max_length=50)),
                ('icon_url', models.URLField()),
                ('created_at', models.DateField(auto_now_add=True)),
                ('read', models.BooleanField(default=False, help_text='boolean indicating if notification has been read or not')),
                ('read_at', models.DateField(blank=True, null=True)),
                ('emailed', models.BooleanField(default=False, help_text='boolean indicating if notification has been emailed or not')),
                ('emailed_at', models.DateField(blank=True, null=True)),
                ('origin', models.ForeignKey(blank=True, help_text="the notification's sender", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sent_notifications', to=settings.AUTH_USER_MODEL)),
                ('target', models.ForeignKey(help_text="the notification's recipient", on_delete=django.db.models.deletion.CASCADE, related_name='received_notifications', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
