# Generated by Django 3.1.1 on 2020-09-15 12:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Trivia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=250)),
                ('type', models.IntegerField(choices=[(1, 'Single'), (2, 'Multiple')], default=1)),
                ('correctanswer', models.ManyToManyField(blank=True, related_name='trivia_answer', to='triviaapp.Option')),
                ('options', models.ManyToManyField(related_name='trivia_options', to='triviaapp.Option')),
            ],
        ),
        migrations.CreateModel(
            name='Answersheet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_completed', models.DateTimeField(auto_now=True)),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='player_name', to='triviaapp.player')),
                ('playeranswer', models.ManyToManyField(blank=True, related_name='player_answer', to='triviaapp.Option')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='player_question', to='triviaapp.player')),
            ],
        ),
    ]
