# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-17 01:06
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('asyncmailer', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeferredMail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('context', jsonfield.fields.JSONField(blank=True, null=True)),
                ('email', models.EmailField(max_length=254)),
                ('title', models.CharField(max_length=255)),
                ('key', models.CharField(db_index=True, default='##default_key##', max_length=100)),
                ('schedule_time', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='EmailTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.SlugField()),
                ('html_content', models.TextField()),
                ('text_content', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enabled', models.BooleanField(default=True, verbose_name=b'If this provider is enabled')),
                ('smtp_host', models.CharField(max_length=255, verbose_name=b'Host of SMTP Server')),
                ('smtp_port', models.IntegerField(default=587, verbose_name=b'Port of SMTP Server')),
                ('smtp_username', models.CharField(max_length=255, verbose_name=b'User Name of SMTP Server')),
                ('smtp_password', models.CharField(max_length=255, verbose_name=b'Password of SMTP Server')),
                ('use_tls', models.BooleanField(default=False, verbose_name=b'If the server uses TLS')),
                ('from_address', models.CharField(max_length=255, verbose_name=b'From address for this SMTP Server')),
                ('blacklist', jsonfield.fields.JSONField(blank=True, verbose_name=b'Never send emails to these domains with this provider. e.g., @msn.com')),
                ('quota', models.IntegerField(default=15000, verbose_name=b'Quota of the SMTP Server')),
                ('usage', models.IntegerField(default=0, verbose_name=b'Usage of the SMTP Server')),
                ('quota_type_is_daily', models.BooleanField(default=False, verbose_name=b'Is the quota of the server daily?')),
                ('preference', models.IntegerField(default=0, verbose_name=b'Preference of the Server, Higher the Better')),
            ],
        ),
        migrations.AddField(
            model_name='deferredmail',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asyncmailer.EmailTemplate'),
        ),
    ]
