# Generated by Django 2.1.3 on 2019-02-08 08:05

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='BuilderEmailInfo',
            fields=[
                ('builder', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='management.Builder')),
                ('email_status', models.BooleanField(db_column='is_email_settings', default='True')),
                ('email_username', models.CharField(blank=True, db_column='Username', max_length=100, null=True)),
                ('email_password', models.CharField(blank=True, db_column='Password', max_length=100, null=True)),
                ('email_host', models.CharField(blank=True, db_column='Host', max_length=100, null=True)),
                ('email_port', models.IntegerField(blank=True, db_column='Port', null=True)),
                ('email_smtpsecure', models.CharField(blank=True, db_column='SMTPSecure', max_length=5, null=True)),
                ('email_smtpauth', models.IntegerField(blank=True, db_column='SMTPAuth', null=True)),
                ('email_ccaddress', models.CharField(blank=True, db_column='CCAddress', max_length=100, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_time', models.DateTimeField(auto_now_add=True)),
                ('modified_time', models.DateTimeField(auto_now=True)),
                ('subject', models.CharField(max_length=250, null=True)),
                ('message_content', models.TextField(default='Text')),
                ('tries', mail.models.MinMaxInt(default=0)),
                ('status', models.IntegerField(choices=[(-1, 'Error'), (0, 'Que'), (1, 'Sent')], default=0)),
            ],
        ),
        migrations.CreateModel(
            name='EmailTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('template_name', models.CharField(help_text='This has to be unique', max_length=100, unique=True, verbose_name='Template name')),
                ('message_content', models.TextField()),
                ('projects', models.ManyToManyField(blank=True, to='management.Project')),
            ],
        ),
        migrations.CreateModel(
            name='ExternalAttachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.CharField(max_length=100)),
                ('file_object', models.FileField(upload_to=mail.models.get_upload_path)),
                ('creation_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_time', models.DateTimeField(auto_now=True, null=True)),
                ('property_name', models.ManyToManyField(to='management.Project')),
            ],
        ),
        migrations.CreateModel(
            name='filesattached',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filename', models.CharField(max_length=200)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('projectid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Project')),
            ],
        ),
        migrations.CreateModel(
            name='InlineAttachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.CharField(max_length=250)),
                ('file_object', models.FileField(upload_to='attachment')),
                ('creation_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('status', models.NullBooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Mail',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('subject', models.CharField(max_length=250)),
                ('body', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('builderid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Builder')),
            ],
        ),
        migrations.CreateModel(
            name='ReportTemplates',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('selectedO', models.TextField(blank=True, null=True)),
                ('filteredO', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='ReportTemplatesassigin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('builderid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Builder')),
                ('reportTemplatesid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mail.ReportTemplates')),
            ],
        ),
        migrations.AddField(
            model_name='email',
            name='ext_attachments',
            field=models.ManyToManyField(blank=True, to='mail.ExternalAttachment'),
        ),
    ]
