# Generated by Django 2.1.4 on 2019-01-28 18:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('v4_player', '0001_initial'),
        ('v4_team', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BasketballStats',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fouls_home', models.IntegerField(default=0, null=True)),
                ('fouls_away', models.IntegerField(default=0, null=True)),
                ('dribbles', models.IntegerField(blank=True, null=True)),
                ('blocks', models.IntegerField(blank=True, null=True)),
                ('steals', models.IntegerField(blank=True, null=True)),
                ('assists', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Commentary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=4000)),
                ('minute', models.TimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
                ('is_successful', models.BooleanField(default=True)),
                ('minute', models.TimeField()),
                ('part_of_game', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FootballStats',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fouls_home', models.IntegerField(default=0, null=True)),
                ('fouls_away', models.IntegerField(default=0, null=True)),
                ('shots_away', models.IntegerField(blank=True, default=0, null=True)),
                ('shots_home', models.IntegerField(blank=True, default=0, null=True)),
                ('corner_home', models.IntegerField(blank=True, default=0, null=True)),
                ('corner_away', models.IntegerField(blank=True, default=0, null=True)),
                ('shots_on_target_home', models.IntegerField(blank=True, default=0, null=True)),
                ('shots_on_target_away', models.IntegerField(blank=True, default=0, null=True)),
                ('possession_home', models.IntegerField(blank=True, default=0, null=True)),
                ('possession_away', models.IntegerField(blank=True, default=0, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Lineup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_starter', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('home_score', models.IntegerField(null=True)),
                ('away_score', models.IntegerField(null=True)),
                ('date', django_jalali.db.models.jDateTimeField(default=datetime.datetime.now)),
                ('MOTM', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='v4_player.Player')),
                ('away', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='away_team', to='v4_team.Team')),
                ('home', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='host_team', to='v4_team.Team')),
            ],
        ),
        migrations.CreateModel(
            name='Multimedia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('pic', 'image'), ('clip', 'video')], max_length=10)),
                ('file', models.FileField(upload_to='')),
                ('caption', models.CharField(blank=True, max_length=4000, null=True)),
                ('upload_time', django_jalali.db.models.jDateTimeField(default=datetime.datetime.now)),
                ('match', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match')),
            ],
        ),
        migrations.AddField(
            model_name='lineup',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match'),
        ),
        migrations.AddField(
            model_name='lineup',
            name='player',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_player.Player'),
        ),
        migrations.AddField(
            model_name='footballstats',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match'),
        ),
        migrations.AddField(
            model_name='event',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match'),
        ),
        migrations.AddField(
            model_name='event',
            name='player1',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='change_out', to='v4_player.Player'),
        ),
        migrations.AddField(
            model_name='event',
            name='player2',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='change_in', to='v4_player.Player'),
        ),
        migrations.AddField(
            model_name='commentary',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match'),
        ),
        migrations.AddField(
            model_name='basketballstats',
            name='match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='v4_match.Match'),
        ),
        migrations.AddField(
            model_name='basketballstats',
            name='player',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='v4_player.Player'),
        ),
    ]
