# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-11-08 17:16
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('msknet_censorship', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_answered', models.BooleanField(default=True)),
                ('text_answer', models.TextField(blank=True, null=True)),
            ],
            options={
                'ordering': ['commit', 'question', 'id'],
            },
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text_content', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Commit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commit_time', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'permissions': (('manage_commit', 'Can view and do other management to commits.'),),
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_text', models.TextField()),
                ('optional', models.BooleanField(default=False)),
                ('is_choice', models.BooleanField(default=False)),
                ('order', models.IntegerField(default=0)),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='Questionnaire',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='UserSuggest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('suggest', models.TextField(blank=True)),
                ('decision', models.NullBooleanField()),
                ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('elder', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='censor', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='question',
            name='questionnaire',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Questionnaire'),
        ),
        migrations.AddField(
            model_name='commit',
            name='questionnaire',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Questionnaire'),
        ),
        migrations.AddField(
            model_name='commit',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='choice',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Question'),
        ),
        migrations.AddField(
            model_name='answer',
            name='choice_answer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Choice'),
        ),
        migrations.AddField(
            model_name='answer',
            name='commit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Commit'),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='msknet_censorship.Question'),
        ),
    ]
