# Generated by Django 3.0.3 on 2020-02-10 06:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FormData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('friendly_name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[('draft', 'draft'), ('submit', 'submit')], default='draft', max_length=20)),
                ('form_data', django_mysql.models.JSONField(default=dict)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('last_updated_on', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'form_data',
            },
        ),
        migrations.CreateModel(
            name='Forms',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('form_name', models.CharField(max_length=50, unique=True)),
                ('form_fields', models.TextField(blank=True, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('last_updated_on', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'forms',
            },
        ),
        migrations.CreateModel(
            name='UserFormMapping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('last_updated_on', models.DateTimeField(auto_now=True)),
                ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='forms.Forms')),
            ],
            options={
                'db_table': 'user_form_mapping',
                'ordering': ['-last_updated_on'],
            },
        ),
    ]
