# Generated by Django 2.0.3 on 2018-03-08 15:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('event', models.CharField(db_index=True, max_length=32)),
                ('object_id', models.PositiveIntegerField(blank=True, default=None, null=True)),
                ('target_id', models.PositiveIntegerField(blank=True, default=None, null=True)),
                ('is_read', models.BooleanField(db_index=True, default=False)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('actor', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('object_content_type', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notification_object', to='contenttypes.ContentType')),
                ('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL)),
                ('target_content_type', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notification_target', to='contenttypes.ContentType')),
            ],
            options={
                'verbose_name': 'notification',
                'ordering': ('-created',),
                'verbose_name_plural': 'notifications',
            },
        ),
    ]
