# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-24 18:40
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import re


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('statistic', '0001_initial'),
        ('psychological_models', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.CharField(default='', max_length=1024, verbose_name='Ответ')),
            ],
            options={
                'verbose_name_plural': 'Ответы',
                'verbose_name': 'Ответ',
            },
        ),
        migrations.CreateModel(
            name='ClientAndAnswerConnection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='development_of_story.Answer', verbose_name='Привязка к ответу')),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='statistic.Client', verbose_name='Привязка к клиенту')),
            ],
            options={
                'verbose_name_plural': 'Связи клиентов и ответов',
                'verbose_name': 'Связь клиента и ответа',
            },
        ),
        migrations.CreateModel(
            name='PsychotypeCharacteristic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('symptom_vector', models.CharField(default='0,0,0,0,0,0,0,0,0,0,0', max_length=32, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Вектор признаков')),
                ('parameter_vector', models.CharField(default='0,0,0,0,0,0,0,0,0,0,0', max_length=32, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Вектор параметров')),
                ('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='development_of_story.Answer', verbose_name='Характеризует вопрос')),
                ('basis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='psychological_models.BasisOfPsychotype', verbose_name='На основе базиса')),
            ],
            options={
                'verbose_name_plural': 'Характеристики психотипа',
                'verbose_name': 'Характеристика психотипа',
            },
        ),
        migrations.CreateModel(
            name='Scene',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='Новая сцена', max_length=256, verbose_name='Название сцены')),
                ('description', models.TextField(default='', max_length=2048, verbose_name='Описание сцены.')),
                ('question', models.TextField(default='?', max_length=1024, verbose_name='Вопрос')),
                ('likes', models.IntegerField(default=0, verbose_name='Нравится')),
                ('scene_order', models.PositiveSmallIntegerField(default=0, verbose_name='Порядок в истории')),
            ],
            options={
                'verbose_name_plural': 'Сцены',
                'verbose_name': 'Сцена',
            },
        ),
        migrations.CreateModel(
            name='Story',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='Новая история', max_length=256, verbose_name='Название сюжета')),
                ('description', models.TextField(default='', max_length=2048, verbose_name='Описание сюжета')),
                ('likes', models.IntegerField(default=0, verbose_name='Нравится')),
                ('bases', models.ManyToManyField(help_text='Выберите хотя бы один базис', to='psychological_models.BasisOfPsychotype', verbose_name='Базисы')),
            ],
            options={
                'verbose_name_plural': 'Сюжеты',
                'verbose_name': 'Сюжет',
            },
        ),
        migrations.AddField(
            model_name='scene',
            name='story',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='development_of_story.Story', verbose_name='Из истории'),
        ),
        migrations.AddField(
            model_name='answer',
            name='scene',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='development_of_story.Scene', verbose_name='Из сцены'),
        ),
        migrations.AddField(
            model_name='answer',
            name='story',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='development_of_story.Story', verbose_name='Из истории'),
        ),
    ]
