# Generated by Django 3.1.2 on 2020-10-27 06:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Fields',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(max_length=256, verbose_name='Label')),
                ('field_type', models.CharField(choices=[('1', 'Text Area'), ('2', 'Integer'), ('3', 'Date Time'), ('4', 'Date'), ('5', 'Text'), ('6', 'Selector')], max_length=15, verbose_name='Type')),
                ('default_value', models.CharField(blank=True, default=' ', max_length=1024, null=True, verbose_name='Defaul Value')),
                ('validation', models.CharField(choices=[('1', 'Email'), ('2', 'Text'), ('3', 'Integer')], max_length=15, verbose_name='Validation')),
                ('requirement', models.BooleanField(default=False, verbose_name='Requirement')),
                ('is_published', models.BooleanField(default=False, verbose_name='is published')),
            ],
            options={
                'verbose_name': 'Field',
                'verbose_name_plural': 'Fields',
            },
        ),
        migrations.CreateModel(
            name='Forms',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1024, verbose_name='Name')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_published', models.BooleanField(default=False, verbose_name='is published')),
            ],
            options={
                'verbose_name': 'Form',
                'verbose_name_plural': 'Forms',
            },
        ),
        migrations.CreateModel(
            name='Value',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.TextField(verbose_name='Value')),
                ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='field_name', to='Forms.fields')),
            ],
            options={
                'verbose_name': 'Value',
                'verbose_name_plural': 'Values',
            },
        ),
        migrations.CreateModel(
            name='Response',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field', models.CharField(max_length=1001, verbose_name='Question')),
                ('value', models.TextField(verbose_name='Answer')),
                ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses_form', to='Forms.forms')),
            ],
            options={
                'verbose_name': 'Response',
                'verbose_name_plural': 'Responses',
            },
        ),
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('option', models.CharField(max_length=20, verbose_name='Option')),
                ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='field_name_select', to='Forms.fields')),
            ],
            options={
                'verbose_name': 'Option',
                'verbose_name_plural': 'Options',
            },
        ),
        migrations.AddField(
            model_name='fields',
            name='form',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fields', to='Forms.forms'),
        ),
        migrations.CreateModel(
            name='Emails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=64, verbose_name='Emails')),
                ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='forms_sends_to', to='Forms.forms')),
            ],
            options={
                'verbose_name': 'Email',
                'verbose_name_plural': 'Emails',
            },
        ),
    ]
