# Generated by Django 3.0.7 on 2020-10-05 21:50

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(max_length=100, unique=True, verbose_name='username')),
                ('email', models.EmailField(max_length=254)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_employee', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Contest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contest_start_date', models.DateTimeField(blank=True)),
                ('contest_started', models.BooleanField(default=False)),
                ('contest_completed', models.BooleanField(default=False)),
                ('slug', models.SlugField(max_length=32, unique=True)),
                ('game_length', models.IntegerField(default=10)),
                ('pause_length', models.IntegerField(default=5)),
                ('max_teams', models.IntegerField(default=20)),
                ('games_sheduled', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True, verbose_name='team_name')),
                ('description', models.TextField()),
                ('slug', models.SlugField(blank=True)),
                ('selected_for_contest', models.BooleanField(blank=True, default=False)),
                ('added_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sergtoto.Contest')),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sergtoto.Team')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score_team_a', models.IntegerField(default=0)),
                ('score_team_b', models.IntegerField(default=0)),
                ('game_is_started', models.BooleanField(default=False)),
                ('game_is_played', models.BooleanField(default=False)),
                ('slug', models.SlugField(max_length=32, unique=True)),
                ('game_date_time', models.DateTimeField(default=datetime.datetime(2020, 10, 5, 21, 50, 54, 952136, tzinfo=utc))),
                ('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sergtoto.Contest')),
                ('team_a', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='name_a', to='sergtoto.Team')),
                ('team_b', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='name_b', to='sergtoto.Team')),
            ],
        ),
        migrations.CreateModel(
            name='Bet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('team_a_win', models.BooleanField(blank=True, default=False)),
                ('team_b_win', models.BooleanField(blank=True, default=False)),
                ('draw', models.BooleanField(blank=True, default=False)),
                ('bet_won', models.BooleanField(blank=True, default=False)),
                ('bet_loose', models.BooleanField(blank=True, default=False)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sergtoto.Game')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
