# Generated by Django 3.1.4 on 2021-01-13 21:56

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dude',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, verbose_name='Имя')),
                ('editing_key', models.CharField(blank=True, default='pbkdf2_sha256$216000$AhHzjneYUlOs$+C5gOJpte/+/EZ6hItdyMSYRBzHRRx7PUgP05iS/aN8=', max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('picture', models.ImageField(upload_to='images', verbose_name='Картинка')),
                ('editing_key', models.CharField(blank=True, default='pbkdf2_sha256$216000$IPQCHrhJxy3w$ZfQap88QKKO2aLGbHgJ/XHIgtoyH9W+f44QBrx682tA=', max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')),
                ('quiz_name', models.CharField(max_length=50, verbose_name='Название теста')),
                ('is_public', models.BooleanField(default=True, verbose_name='Публичний тест?')),
            ],
        ),
        migrations.CreateModel(
            name='Result',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.FloatField(verbose_name='Успешность Сани')),
                ('pass_date', models.DateTimeField(auto_now_add=True, verbose_name='Дата прохождения')),
                ('dude', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='questie.dude')),
                ('quiz', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='results', to='questie.quiz')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('wording', models.CharField(max_length=100, verbose_name='Формулировка вопроса')),
                ('text', models.CharField(blank=True, max_length=2500, verbose_name='Текст вопроса')),
                ('is_multiple_choice', models.BooleanField(default=False, verbose_name='Несколько ответов')),
                ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='questions', to='questie.image')),
                ('quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='questie.quiz')),
            ],
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('text', models.CharField(max_length=100, verbose_name='Текст ответа')),
                ('is_correct', models.BooleanField(default=False, verbose_name='Верный ответ')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='questie.question')),
            ],
        ),
    ]
