# Generated by Django 6.0.4 on 2026-07-16 08:10

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


class Migration(migrations.Migration):

    dependencies = [
        ('notifications', '0002_alter_notification_notification_type'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='EmailLog',
            fields=[
                ('id', models.UUIDField(default=apps.notifications.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('recipient_email', models.EmailField(max_length=254)),
                ('subject', models.CharField(max_length=255)),
                ('notification_type', models.CharField(blank=True, max_length=50)),
                ('status', models.CharField(choices=[('sent', 'Sent'), ('failed', 'Failed')], max_length=10)),
                ('error', models.CharField(blank=True, max_length=500)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='email_logs', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'notification_email_logs',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['-created_at'], name='notificatio_created_36e91c_idx'), models.Index(fields=['user', '-created_at'], name='notificatio_user_id_557049_idx')],
            },
        ),
    ]
