# Generated by Django 3.1 on 2021-04-11 05:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='assistant_referee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='coach',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coach_name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='kfupm_team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_group', models.CharField(max_length=255)),
                ('match_played', models.IntegerField()),
                ('won', models.IntegerField()),
                ('lose', models.IntegerField()),
                ('draw', models.IntegerField()),
                ('goal_for', models.IntegerField()),
                ('goal_against', models.IntegerField()),
                ('goal_diff', models.IntegerField()),
                ('points', models.IntegerField()),
                ('group_position', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='kfupm_tournament',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tr_name', models.CharField(max_length=255)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='kfupm_venue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('venue_name', models.CharField(max_length=255)),
                ('venue_status', models.BooleanField(default=True)),
                ('aud_capacity', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='match_played',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('play_stage', models.CharField(max_length=1)),
                ('play_date', models.DateField()),
                ('results', models.CharField(max_length=255)),
                ('decided_by', models.CharField(max_length=255)),
                ('goal_score', models.CharField(max_length=255)),
                ('audience', models.IntegerField()),
                ('stop1_sec', models.IntegerField()),
                ('stop2_sec', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('jersey_no', models.IntegerField()),
                ('player_name', models.CharField(max_length=255)),
                ('date_of_birth', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='playing_position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position_desc', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='referee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('referee_name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='team_coaches',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coach_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.coach')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
                ('tr_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_tournament')),
            ],
        ),
        migrations.CreateModel(
            name='player_in_out',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('in_out', models.CharField(max_length=255)),
                ('time_in_out', models.DateTimeField()),
                ('play_schedule', models.CharField(max_length=255)),
                ('player_half', models.BooleanField()),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.CreateModel(
            name='player_booked',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('booking_time', models.DateTimeField()),
                ('play_schedule', models.CharField(max_length=255)),
                ('player_half', models.BooleanField()),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.AddField(
            model_name='player',
            name='position_to_play',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.playing_position'),
        ),
        migrations.AddField(
            model_name='player',
            name='team_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team'),
        ),
        migrations.CreateModel(
            name='penalty_shootout',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score_goal', models.CharField(max_length=1)),
                ('kick_no', models.IntegerField()),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.CreateModel(
            name='penalty_gk',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player_gk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.AddField(
            model_name='match_played',
            name='player_of_match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player'),
        ),
        migrations.AddField(
            model_name='match_played',
            name='referee_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.referee'),
        ),
        migrations.AddField(
            model_name='match_played',
            name='venue_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_venue'),
        ),
        migrations.CreateModel(
            name='match_details',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('play_stage', models.CharField(max_length=1)),
                ('win_lose', models.CharField(max_length=1)),
                ('decided_by', models.CharField(max_length=255)),
                ('goal_score', models.IntegerField()),
                ('penalty_score', models.IntegerField()),
                ('asst_ref', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.assistant_referee')),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player_gk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.CreateModel(
            name='match_captain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player_captain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
        migrations.AddField(
            model_name='kfupm_team',
            name='tr_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_tournament'),
        ),
        migrations.CreateModel(
            name='goal_details',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goal_time', models.DateTimeField()),
                ('goal_type', models.CharField(max_length=255)),
                ('play_stage', models.CharField(max_length=1)),
                ('goal_schedule', models.CharField(max_length=255)),
                ('goal_half', models.BooleanField()),
                ('match_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.match_played')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.player')),
                ('team_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tour.kfupm_team')),
            ],
        ),
    ]
