# Generated by Django 3.0.8 on 2021-05-18 20:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dis_id', models.IntegerField(default=228, verbose_name='User ID')),
                ('nick', models.CharField(default='NO NICK', max_length=90, verbose_name='Nickname')),
                ('lifetime', models.FloatField(default=1, verbose_name='Average lifetime')),
                ('games_amount', models.IntegerField(default=0, verbose_name='Arenas played')),
                ('wins', models.IntegerField(default=0, verbose_name='Won in total')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_string', models.TextField(default='Empty', max_length=300, verbose_name='Question')),
                ('right_ind', models.IntegerField(default=1, verbose_name='Index of the right answer')),
            ],
        ),
        migrations.CreateModel(
            name='QuestionTopic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Empty', max_length=30, verbose_name='Topic name')),
            ],
        ),
        migrations.CreateModel(
            name='QuestionVariant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('variant', models.TextField(default='Empty', max_length=300, verbose_name='Variant')),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('players_amount', models.IntegerField(default=0, verbose_name='Players amount')),
                ('rounds_amount', models.IntegerField(default=1, verbose_name='Rounds played')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='Arena ended')),
                ('topic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.QuestionTopic')),
            ],
        ),
        migrations.CreateModel(
            name='Round',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('right_ind', models.IntegerField(default=-1, verbose_name='Index of the right answer')),
                ('first_variant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='first_round_variant', to='arenastatistics.QuestionVariant')),
                ('four_variant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='fouth_round_variant', to='arenastatistics.QuestionVariant')),
                ('question', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Question')),
                ('second_variant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='second_round_variant', to='arenastatistics.QuestionVariant')),
                ('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Session')),
                ('three_variant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='third_round_variant', to='arenastatistics.QuestionVariant')),
            ],
        ),
        migrations.AddField(
            model_name='question',
            name='topic',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.QuestionTopic'),
        ),
        migrations.AddField(
            model_name='question',
            name='varFour',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='fourth_question_variant', to='arenastatistics.QuestionVariant'),
        ),
        migrations.AddField(
            model_name='question',
            name='varOne',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='first_question_variant', to='arenastatistics.QuestionVariant'),
        ),
        migrations.AddField(
            model_name='question',
            name='varThree',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='third_question_variant', to='arenastatistics.QuestionVariant'),
        ),
        migrations.AddField(
            model_name='question',
            name='varTwo',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='second_question_variant', to='arenastatistics.QuestionVariant'),
        ),
        migrations.CreateModel(
            name='Participation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('player', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Player')),
                ('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Session')),
            ],
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.IntegerField(default=-1, verbose_name='Selected answer')),
                ('right', models.BooleanField(default=False, verbose_name='Answer is right')),
                ('player', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Player')),
                ('question', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Question')),
                ('round', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Round')),
                ('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='arenastatistics.Session')),
            ],
        ),
    ]
