# Generated by Django 3.2.7 on 2021-09-15 07:41

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='Actions',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('signal_action', models.CharField(max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='EmailModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creator_name', models.CharField(max_length=20)),
                ('email_host', models.CharField(max_length=30)),
                ('email_use_tls', models.BooleanField(help_text='True for Gmail')),
                ('email_use_ssl', models.BooleanField(help_text='False for Gmail')),
                ('email_port', models.IntegerField()),
                ('email_host_user', models.EmailField(max_length=254)),
                ('email_host_password', models.CharField(max_length=50)),
                ('data_created', models.DateField(auto_now_add=True)),
                ('last_modified', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='List',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('list', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Modules',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('modules', models.CharField(max_length=20)),
                ('user_friendly_name', models.CharField(blank=True, max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Notifications',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('notification_type', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Policies',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=254)),
                ('policy_name', models.CharField(max_length=30)),
                ('purchase_date', models.DateField()),
                ('end_date', models.DateField()),
                ('amount', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='UserEmails',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=254)),
                ('subject', models.CharField(max_length=20, null=True)),
                ('body', models.TextField(max_length=500, null=True)),
                ('signature', models.TextField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='EmailReminder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=20)),
                ('body', models.TextField(max_length=500)),
                ('signature', models.TextField(max_length=100)),
                ('occurrence', models.BooleanField(choices=[(True, 'single'), (False, 'recurring')], help_text='True for single')),
                ('schedule', models.BooleanField(choices=[(True, 'before'), (False, 'after')])),
                ('status', models.BooleanField(default=True)),
                ('minutes', models.PositiveSmallIntegerField(blank=True, help_text='Number of minutes for the Minutes type', null=True)),
                ('schedule_period', models.CharField(choices=[('O', 'Once'), ('I', 'Minutes'), ('H', 'Hourly'), ('D', 'Daily'), ('W', 'Weekly'), ('M', 'Monthly'), ('Q', 'Quarterly'), ('Y', 'Yearly'), ('C', 'Cron')], default='O', max_length=1, verbose_name='Schedule Type')),
                ('repeats', models.IntegerField(default=-1, help_text='n = n times, -1 = forever', verbose_name='Repeats')),
                ('next_run', models.DateTimeField(default=django.utils.timezone.now, null=True, verbose_name='Next Run')),
                ('is_deleted', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('actions', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='emails.actions')),
                ('email_notification_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emails.notifications')),
                ('modules', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='emails.modules')),
            ],
        ),
    ]
