# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-10 23:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Alternative',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(blank=True, default='', max_length=255)),
                ('body', models.TextField(blank=True, default='')),
            ],
            options={
                'ordering': ('type',),
            },
        ),
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.CharField(max_length=255)),
                ('file', models.FileField(upload_to=mail_save.models.email_attachment_path)),
                ('mimetype', models.CharField(blank=True, default=None, max_length=255, null=True)),
            ],
            options={
                'ordering': ('file_name',),
            },
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_email', models.CharField(blank=True, default='', max_length=255)),
                ('to_emails', models.TextField(blank=True, default='')),
                ('cc_emails', models.TextField(blank=True, default='')),
                ('bcc_emails', models.TextField(blank=True, default='')),
                ('all_recipients', models.TextField(blank=True, default='')),
                ('headers', models.TextField(blank=True, default='')),
                ('subject', models.TextField(blank=True, default='')),
                ('body', models.TextField(blank=True, default='')),
                ('raw', models.TextField(blank=True, default='')),
                ('sent_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-sent_at',),
            },
        ),
        migrations.AddField(
            model_name='attachment',
            name='email',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='mail_save.Email'),
        ),
        migrations.AddField(
            model_name='alternative',
            name='email',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alternatives', to='mail_save.Email'),
        ),
    ]
