# Generated by Django 3.2 on 2025-04-16 21:06

from django.db import migrations, models
import easy_email.models
import easy_email.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(max_length=500, null=True, upload_to=easy_email.models.upload_to)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Only underscore (_), lowercase characters, and numbers are allowed. Name cannot start with a number.', max_length=50, unique=True, validators=[easy_email.validators.TemplateNameValidator()])),
                ('content', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(blank=True, max_length=500, null=True)),
                ('body', models.TextField(blank=True, null=True)),
                ('recipients', models.TextField(blank=True, null=True)),
                ('from_email', models.CharField(blank=True, max_length=100, null=True)),
                ('cc', models.TextField(blank=True, null=True)),
                ('send_time', models.DateTimeField(blank=True, null=True)),
                ('status', models.IntegerField(blank=True, choices=[[0, 'Pending'], [1, 'Success'], [2, 'Error']], default=0, null=True)),
                ('logs', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('attachments', models.ManyToManyField(blank=True, to='easy_email.Attachment')),
            ],
        ),
    ]
