# Generated by Django 3.2 on 2021-05-20 11:58

import django.contrib.postgres.fields
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.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=200)),
                ('score', models.IntegerField()),
            ],
            options={
                'ordering': ['-text'],
            },
        ),
        migrations.CreateModel(
            name='AnswerTest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('choose', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='query.answer')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=200)),
                ('answers', models.ManyToManyField(to='query.Answer')),
            ],
        ),
        migrations.CreateModel(
            name='PsihoTest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=100)),
                ('story', models.TextField()),
                ('total_score', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None), blank=True, null=True, size=None)),
                ('questions', models.ManyToManyField(to='query.Question')),
            ],
        ),
        migrations.CreateModel(
            name='AssignedTest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('data', models.DateField()),
                ('message', models.CharField(blank=True, max_length=200, null=True)),
                ('answer', models.ManyToManyField(blank=True, to='query.AnswerTest')),
                ('psihotest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='query.psihotest')),
            ],
        ),
        migrations.AddField(
            model_name='answertest',
            name='question',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='query.question'),
        ),
    ]
