# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-07 06:38
from __future__ import unicode_literals

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='AnswerLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answered', models.DateTimeField(verbose_name='Answered On')),
                ('saved', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Saved On')),
                ('user', models.TextField(blank=True, verbose_name='User Id')),
                ('response', models.TextField(blank=True, verbose_name='Response ')),
            ],
            options={
                'verbose_name_plural': 'User Answers',
                'verbose_name': 'User Answer Log',
            },
        ),
        migrations.CreateModel(
            name='Challenge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='Challenge Name')),
                ('activation_date', models.DateTimeField(verbose_name='Activate On')),
                ('deactivation_date', models.DateTimeField(verbose_name='Deactivate On')),
                ('state', models.PositiveIntegerField(choices=[(1, 'Incomplete'), (2, 'Ready for review'), (3, 'Published'), (4, 'Done')], default=1, verbose_name='State')),
                ('end_processed', models.BooleanField(default=False, verbose_name='Processed')),
            ],
            options={
                'verbose_name_plural': 'Challenges',
                'verbose_name': 'Challenge',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, unique=True, verbose_name='Name')),
                ('order', models.PositiveIntegerField(default=0, verbose_name='Order')),
                ('picture', models.URLField(blank=True, null=True, verbose_name='Picture URL')),
                ('text', models.TextField(blank=True, verbose_name='Text')),
                ('type', models.PositiveIntegerField(choices=[(1, 'Multiple choice'), (2, 'Freeform'), (3, 'Picture')], default=2, verbose_name='Type')),
                ('challenge', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='content.Challenge')),
            ],
            options={
                'verbose_name_plural': 'Questions',
                'verbose_name': 'Question',
            },
        ),
        migrations.CreateModel(
            name='QuestionOption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.URLField(blank=True, null=True, verbose_name='Picture URL')),
                ('name', models.TextField(null=True, verbose_name='Name')),
                ('text', models.TextField(blank=True, verbose_name='Text')),
                ('question', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='options', to='content.Question')),
            ],
            options={
                'verbose_name_plural': 'Question Options',
                'verbose_name': 'Question Option',
            },
        ),
        migrations.AddField(
            model_name='answerlog',
            name='challenge',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='content.Challenge'),
        ),
        migrations.AddField(
            model_name='answerlog',
            name='question',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='content.Question'),
        ),
    ]
