# Generated by Django 3.0 on 2021-04-02 15:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='EbGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, verbose_name='наименование')),
            ],
            options={
                'verbose_name': 'группа по электробезопасности',
                'verbose_name_plural': 'группы по электробезопасности',
            },
        ),
        migrations.CreateModel(
            name='TestName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=500, verbose_name='название теста')),
            ],
            options={
                'verbose_name': 'название теста',
                'verbose_name_plural': 'названия тестов',
            },
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, unique=True, verbose_name='номер билета')),
                ('answers_true', models.DecimalField(decimal_places=0, max_digits=1, verbose_name='правильный ответ')),
                ('answers_false', models.DecimalField(decimal_places=0, max_digits=1, verbose_name='неправильный ответ')),
                ('eb_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eb_tests.EbGroup', verbose_name='группа по электробезопасности')),
            ],
            options={
                'verbose_name': 'номер билета',
                'verbose_name_plural': 'номера билетов',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(max_length=600, verbose_name='текст вопроса')),
                ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eb_tests.Ticket', verbose_name='номер билета')),
            ],
            options={
                'verbose_name': 'вопрос',
                'verbose_name_plural': 'вопросы',
            },
        ),
        migrations.AddField(
            model_name='ebgroup',
            name='test_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eb_tests.TestName', verbose_name='название теста'),
        ),
        migrations.CreateModel(
            name='Answers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(unique=True, verbose_name='текст ответа')),
                ('truthy', models.BooleanField(verbose_name='правильность ответа')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eb_tests.Question', verbose_name='вопрос')),
            ],
            options={
                'verbose_name': 'ответ',
                'verbose_name_plural': 'ответы',
            },
        ),
    ]
