# Generated by Django 2.1.5 on 2019-01-30 18:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.BooleanField(default=False)),
                ('in_progress', models.BooleanField(default=False)),
                ('judging', models.IntegerField(default=0)),
                ('round', models.IntegerField(default=1)),
                ('number_of_players', models.IntegerField()),
                ('number_of_rounds', models.IntegerField()),
                ('card_name', models.CharField(max_length=1000)),
                ('completed', models.BooleanField(default=False)),
                ('judge', models.CharField(blank=True, max_length=256)),
                ('number_of_submissions', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='InGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(default=0)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='game.Game')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='players',
            field=models.ManyToManyField(through='game.InGame', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='ingame',
            unique_together={('game', 'player')},
        ),
    ]
