# Generated by Django 3.1 on 2020-09-11 19:41

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='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('desc', models.TextField()),
                ('date_played', models.DateField()),
                ('status', models.IntegerField(max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('status', models.IntegerField(max_length=2)),
                ('point', models.IntegerField(max_length=10)),
                ('desc', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Prediction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_predicted', models.DateField()),
                ('status', models.IntegerField(max_length=2)),
                ('match_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='guess.match')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='match',
            name='team_1',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='guess.team'),
        ),
        migrations.AddField(
            model_name='match',
            name='team_2',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='match_team2', to='guess.team'),
        ),
        migrations.AddField(
            model_name='match',
            name='team_won',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='match_team_won', to='guess.team'),
        ),
    ]
