# Generated by Django 3.2.11 on 2022-01-14 07:31

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('django_notifications', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='NotificationConfig',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('delay_notifications', models.BooleanField(default=False, help_text='Retarder les notifications en utilisant une tâche cron .', verbose_name='Retarder les notifications')),
                ('delay', models.PositiveIntegerField(default=0, help_text='Délais en secondes', verbose_name='Délais')),
                ('receive_notifications_field', models.CharField(default='userprofile.receive_notifications', help_text='Field to check if the user wants to receive notifications.', max_length=255, verbose_name='Blocking notifications field')),
                ('receive_messages_field', models.CharField(default='userprofile.receive_messages', help_text='Field to check if the user wants to receive messages.', max_length=255, verbose_name='Blocking messages field')),
            ],
            options={
                'verbose_name': 'Configuration des notifications',
                'verbose_name_plural': 'Configurations des notifications',
            },
        ),
        migrations.AlterModelOptions(
            name='attachment',
            options={'ordering': ('notification', 'id'), 'verbose_name': 'Pièce jointe', 'verbose_name_plural': 'Pièces jointes'},
        ),
        migrations.AlterField(
            model_name='notification',
            name='created_at',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Ajouté le'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='created_by',
            field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.SET_DEFAULT, to=settings.AUTH_USER_MODEL, verbose_name='Ajouté par'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='delayed_sending_at',
            field=models.DateTimeField(blank=True, null=True, verbose_name='Envoi différé'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='email_recipients',
            field=models.TextField(blank=True, help_text='Une adresse par ligne', verbose_name='Adresses électroniques de destinataires'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='html_body',
            field=models.TextField(verbose_name='Corps du message, en HTML'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='recipients',
            field=models.ManyToManyField(blank=True, related_name='notifications', to=settings.AUTH_USER_MODEL, verbose_name='Destinataires'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='sent_at',
            field=models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Envoyé le'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='state_from',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name='État de départ'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='state_to',
            field=models.CharField(blank=True, default='', max_length=255, verbose_name="État d'arrivée"),
        ),
        migrations.AlterField(
            model_name='notification',
            name='subject',
            field=models.CharField(max_length=255, verbose_name='Sujet'),
        ),
        migrations.AlterField(
            model_name='notification',
            name='text_body',
            field=models.TextField(verbose_name='Corps du message, en texte'),
        ),
    ]
