# Generated by Django 5.2.6 on 2025-09-26 07:17

from django.db import migrations, models


class Migration(migrations.Migration):
    replaces = [
        ("django_nitro_mailer", "0001_initial"),
        ("django_nitro_mailer", "0002_alter_email_priority"),
        ("django_nitro_mailer", "0003_emaillog_created_at"),
        ("django_nitro_mailer", "0004_emaillog_extra"),
        ("django_nitro_mailer", "0005_alter_email_options_alter_emaillog_options_and_more"),
    ]

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Email",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("email_data", models.BinaryField(verbose_name="email data")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="created at")),
                ("updated_at", models.DateTimeField(auto_now=True, verbose_name="updated at")),
                (
                    "priority",
                    models.PositiveSmallIntegerField(
                        choices=[(0, "Deferred"), (10, "Low"), (20, "Medium"), (30, "High")],
                        default=20,
                        help_text="Determines the order in which emails are sent.",
                        verbose_name="priority",
                    ),
                ),
            ],
            options={
                "abstract": False,
                "verbose_name": "email",
                "verbose_name_plural": "emails",
            },
        ),
        migrations.CreateModel(
            name="EmailLog",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("email_data", models.BinaryField(verbose_name="email data")),
                (
                    "result",
                    models.PositiveSmallIntegerField(choices=[(0, "Success"), (1, "Failure")], verbose_name="result"),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="created at")),
                ("extra", models.JSONField(default=dict, verbose_name="extra")),
            ],
            options={
                "abstract": False,
                "ordering": ["-created_at"],
                "verbose_name": "email log",
                "verbose_name_plural": "email logs",
            },
        ),
    ]
