# Generated by Django 3.1 on 2020-08-22 13:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Mail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mail', models.CharField(max_length=254)),
                ('is_staff', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='MailCategory',
            fields=[
                ('category_code', models.CharField(max_length=500, primary_key=True, serialize=False)),
                ('category_descr', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='SentMail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('x_message_id', models.CharField(default=None, max_length=1000, null=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, null=True)),
                ('fail_flag', models.BooleanField(default=False)),
                ('bcc_email', models.ManyToManyField(related_name='_sentmail_bcc_email_+', to='django_sendgrid_tracking.Mail')),
                ('category_code', models.ManyToManyField(to='django_sendgrid_tracking.MailCategory')),
                ('cc_email', models.ManyToManyField(related_name='_sentmail_cc_email_+', to='django_sendgrid_tracking.Mail')),
                ('to_email', models.ManyToManyField(related_name='_sentmail_to_email_+', to='django_sendgrid_tracking.Mail')),
            ],
        ),
        migrations.CreateModel(
            name='SendGridNotification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.IntegerField()),
                ('event_code', models.CharField(choices=[('processed', 'Message has been received and is ready to be delivered.'), ('dropped', 'You may see the following drop reasons: Invalid SMTPAPI header, Spam Content (if Spam Checker app is enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota'), ('delivered', 'Message has been successfully delivered to the receiving server.'), ('deferred', 'Receiving server temporarily rejected the message.'), ('bounce', 'Receiving server could not or would not accept the message. If a recipient has previously unsubscribed from your emails, the message is bounced.'), ('open', 'User opened the message'), ('click', 'User clicked on the message link'), ('spamreport', 'Recipient marked message as spam.')], max_length=200)),
                ('sg_message_id', models.CharField(blank=True, max_length=200, null=True)),
                ('x_message_id', models.CharField(blank=True, max_length=100, null=True)),
                ('category_code', models.ManyToManyField(to='django_sendgrid_tracking.MailCategory')),
                ('email', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_sendgrid_tracking.mail')),
                ('sent_mail', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_sendgrid_tracking.sentmail')),
            ],
        ),
    ]
