# Generated by Django 2.1.4 on 2018-12-12 15:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(help_text='Enter your question in here', max_length=200)),
                ('type_field', models.PositiveSmallIntegerField(choices=[(0, 'text'), (1, 'number'), (2, 'radio'), (3, 'select'), (4, 'multi select')])),
                ('choices', models.CharField(blank=True, help_text='if Type Field is (radio, check, select), fill in the option separated by commas. ex: Male, Female', max_length=200, null=True)),
                ('help_text', models.CharField(blank=True, help_text='You can add a help text in here', max_length=200, null=True)),
                ('error_message', models.CharField(blank=True, help_text='Replace default error message if the field is empty', max_length=200, null=True)),
                ('required', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Survey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='question',
            name='survey',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='surveys.Survey'),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='answer', to='surveys.Question'),
        ),
    ]
