# Generated by Django 2.0.6 on 2018-06-15 21:24

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')),
                ('answer', models.TextField(blank=True, null=True, verbose_name='réponse')),
            ],
        ),
        migrations.CreateModel(
            name='Form',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300, verbose_name='titre')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='créé le')),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='FormEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submitted', models.DateTimeField(auto_now_add=True, help_text="Date et heure de soumission de l'entrée.", verbose_name='soumis le')),
                ('form', models.ForeignKey(help_text="Formulaire associé à l'entrée.", on_delete=django.db.models.deletion.CASCADE, related_name='entries', to='dynamicforms.Form')),
            ],
            options={
                'ordering': ('-submitted',),
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_type', models.CharField(max_length=100, verbose_name='type de question')),
                ('text', models.TextField(help_text='intitulé de la question', verbose_name='intitulé')),
                ('required', models.BooleanField(verbose_name='requis')),
                ('form', models.ForeignKey(help_text='Formulaire associé à la question.', on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='dynamicforms.Form')),
            ],
        ),
        migrations.AddField(
            model_name='answer',
            name='entry',
            field=models.ForeignKey(help_text='Entrée associée à la réponse.', on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='dynamicforms.FormEntry'),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='dynamicforms.Question'),
        ),
    ]
