# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-16 15:03
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Blacklist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=200)),
                ('date_added', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name_plural': 'blacklisted e-mail addresses',
                'ordering': ('-date_added',),
                'verbose_name': 'blacklisted e-mail address',
            },
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('result', models.PositiveSmallIntegerField(choices=[(0, 'success'), (1, 'not sent (blacklisted)'), (2, 'failure')])),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('log_message', models.TextField()),
            ],
            options={
                'ordering': ('-date',),
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('to_address', models.CharField(max_length=200)),
                ('from_address', models.CharField(max_length=200)),
                ('subject', models.CharField(max_length=255)),
                ('encoded_message', models.TextField()),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'ordering': ('date_created',),
            },
        ),
        migrations.CreateModel(
            name='QueuedMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('priority', models.PositiveSmallIntegerField(choices=[(1, 'high'), (3, 'normal'), (5, 'low')], default=3)),
                ('deferred', models.DateTimeField(blank=True, null=True)),
                ('retries', models.PositiveIntegerField(default=0)),
                ('date_queued', models.DateTimeField(default=django.utils.timezone.now)),
                ('message', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='django_yubin.Message')),
            ],
            options={
                'ordering': ('priority', 'date_queued'),
            },
        ),
        migrations.AddField(
            model_name='log',
            name='message',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='django_yubin.Message'),
        ),
    ]
