# Generated by Django 2.0.5 on 2018-07-06 07:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('slug', models.CharField(max_length=128, unique=True)),
                ('name', models.CharField(default=models.CharField(max_length=128, unique=True), max_length=128)),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Config',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email_template', models.TextField(default='{{ message }}', verbose_name='Email template')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('slug', models.CharField(max_length=128, unique=True)),
                ('name', models.CharField(default=models.CharField(max_length=128, unique=True), max_length=128)),
                ('description', models.TextField(default='')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='events', to='pynot.Category')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('name', models.CharField(max_length=128)),
                ('description', models.TextField(default='')),
                ('type', models.CharField(default='email', max_length=128)),
                ('collective', models.BooleanField(default=False, help_text='Every user recipient is owner of the same notification.', verbose_name='Collective notification')),
                ('subject', models.TextField(default='')),
                ('message', models.TextField()),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='notifications', to='pynot.Event')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFire',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('subject', models.TextField(default='')),
                ('message', models.TextField()),
                ('event_notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fires', to='pynot.EventNotification')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationRecipient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('recipient', models.CharField(max_length=256)),
                ('type', models.CharField(choices=[('email', 'Correo electrónico'), ('user', 'Usuario'), ('group', 'Grupo')], max_length=64)),
                ('notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recipients', to='pynot.EventNotification')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('recipient', models.CharField(default=None, max_length=256, null=True)),
                ('type', models.CharField(choices=[('email', 'Correo electrónico'), ('user', 'Usuario'), ('group', 'Grupo')], default=None, max_length=64, null=True)),
                ('status', models.CharField(choices=[('pending', 'Pendiente'), ('in_process', 'Procesando'), ('complete', 'Completado'), ('error', 'Error')], default='pending', max_length=64)),
                ('is_read', models.BooleanField(default=False, help_text='The notification has been read.', verbose_name='Has been read')),
                ('is_important', models.BooleanField(default=False, help_text='The notification is important.', verbose_name='Is important')),
                ('notification', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='pynot.EventNotificationFire')),
                ('users', models.ManyToManyField(related_name='notifications', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('name', models.CharField(max_length=128)),
                ('human_name', models.CharField(default=models.CharField(max_length=128), max_length=128)),
                ('serializer', models.TextField(default='')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='parameters', to='pynot.Event')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime',
                 models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.',
                                                  verbose_name='¿Borrado?')),
                ('file', models.CharField(max_length=256)),
                ('notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files',
                                                   to='pynot.EventNotification')),
            ],
            options={
                'abstract': False,
                'ordering': ['creation_datetime'],
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFireFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime',
                 models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.',
                                                  verbose_name='¿Borrado?')),
                ('path', models.CharField(max_length=1024, verbose_name='path')),
                ('fire', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files',
                                           to='pynot.EventNotificationFire')),
            ],
            options={
                'abstract': False,
                'ordering': ['creation_datetime'],
            },
        ),
    ]

# Generated by Django 2.0.5 on 2018-07-06 07:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('slug', models.CharField(max_length=128, unique=True)),
                ('name', models.CharField(default=models.CharField(max_length=128, unique=True), max_length=128)),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Config',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email_template', models.TextField(default='{{ message }}', verbose_name='Email template')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('slug', models.CharField(max_length=128, unique=True)),
                ('name', models.CharField(default=models.CharField(max_length=128, unique=True), max_length=128)),
                ('description', models.TextField(default='')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='events', to='pynot.Category')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('name', models.CharField(max_length=128)),
                ('description', models.TextField(default='')),
                ('type', models.CharField(default='email', max_length=128)),
                ('collective', models.BooleanField(default=False, help_text='Every user recipient is owner of the same notification.', verbose_name='Collective notification')),
                ('subject', models.TextField(default='')),
                ('message', models.TextField()),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='notifications', to='pynot.Event')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFire',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('subject', models.TextField(default='')),
                ('message', models.TextField()),
                ('event_notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fires', to='pynot.EventNotification')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationRecipient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('recipient', models.CharField(max_length=256)),
                ('type', models.CharField(choices=[('email', 'Correo electrónico'), ('user', 'Usuario'), ('group', 'Grupo')], max_length=64)),
                ('notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recipients', to='pynot.EventNotification')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('recipient', models.CharField(default=None, max_length=256, null=True)),
                ('type', models.CharField(choices=[('email', 'Correo electrónico'), ('user', 'Usuario'), ('group', 'Grupo')], default=None, max_length=64, null=True)),
                ('status', models.CharField(choices=[('pending', 'Pendiente'), ('in_process', 'Procesando'), ('complete', 'Completado'), ('error', 'Error')], default='pending', max_length=64)),
                ('is_read', models.BooleanField(default=False, help_text='The notification has been read.', verbose_name='Has been read')),
                ('is_important', models.BooleanField(default=False, help_text='The notification is important.', verbose_name='Is important')),
                ('notification', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='pynot.EventNotificationFire')),
                ('users', models.ManyToManyField(related_name='notifications', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.', verbose_name='¿Borrado?')),
                ('name', models.CharField(max_length=128)),
                ('human_name', models.CharField(default=models.CharField(max_length=128), max_length=128)),
                ('serializer', models.TextField(default='')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='parameters', to='pynot.Event')),
            ],
            options={
                'ordering': ['creation_datetime'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime',
                 models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.',
                                                  verbose_name='¿Borrado?')),
                ('file', models.CharField(max_length=256)),
                ('notification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files',
                                                   to='pynot.EventNotification')),
            ],
            options={
                'abstract': False,
                'ordering': ['creation_datetime'],
            },
        ),
        migrations.CreateModel(
            name='EventNotificationFireFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_datetime',
                 models.DateTimeField(default=django.utils.timezone.now, verbose_name='Fecha de creación del objeto')),
                ('last_update_datetime', models.DateTimeField(verbose_name='Fecha de última actualización del objeto')),
                ('is_erased', models.BooleanField(default=False, help_text='Si lo marca se borrará el elemento.',
                                                  verbose_name='¿Borrado?')),
                ('path', models.CharField(max_length=1024, verbose_name='path')),
                ('fire', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files',
                                           to='pynot.EventNotificationFire')),
            ],
            options={
                'abstract': False,
                'ordering': ['creation_datetime'],
            },
        ),
    ]

# Generated by Django 2.0.5 on 2018-07-06 07:18