# Generated by Django 3.1 on 2022-01-07 14:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('pymess', '0025_migration'),
    ]

    operations = [
        migrations.AddField(
            model_name='attachment',
            name='filename',
            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='filename'),
        ),
        migrations.CreateModel(
            name='EmailTemplateAttachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created at')),
                ('changed_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='changed at')),
                ('content_type', models.CharField(max_length=100, verbose_name='content type')),
                ('file', models.FileField(upload_to=pymess.models.emails.generate_template_attachment_filename,
                                          verbose_name='file')),
                ('filename', models.CharField(blank=True, max_length=100, null=True, verbose_name='filename')),
                ('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                               related_name='template_attachments', to='pymess.emailtemplate',
                                               verbose_name='template')),
            ],
            options={
                'verbose_name': 'e-mail template attachment',
                'verbose_name_plural': 'e-mail template attachments',
            },
        ),
    ]
