# Generated by Django 4.0.3 on 2022-04-07 03:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Conference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('conference_id', models.CharField(default='', max_length=40, verbose_name='conference ID')),
                ('name', models.CharField(default='', max_length=64, verbose_name='name')),
            ],
            options={
                'verbose_name': 'conference',
                'verbose_name_plural': 'conferences',
            },
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('division_id', models.CharField(default='', max_length=40, verbose_name='division ID')),
                ('name', models.CharField(default='', max_length=32, verbose_name='name')),
                ('conference', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='divisions', to='sports.conference', verbose_name='conference')),
            ],
            options={
                'verbose_name': 'division',
                'verbose_name_plural': 'divisions',
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game_id', models.CharField(default='', max_length=40, verbose_name='game ID')),
                ('scheduled', models.DateTimeField(verbose_name='scheduled')),
                ('scored', models.DateTimeField(blank=True, null=True, verbose_name='scored')),
                ('summary', models.TextField(blank=True, null=True, verbose_name='summary')),
                ('coverage', models.CharField(blank=True, default='', max_length=32, verbose_name='coverage')),
                ('home_rotation', models.CharField(blank=True, default='', max_length=32, verbose_name='home rotation')),
                ('away_rotation', models.CharField(blank=True, default='', max_length=32, verbose_name='away rotation')),
                ('status', models.CharField(blank=True, default='', max_length=32, verbose_name='status')),
                ('home_points', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='home points')),
                ('away_points', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='away points')),
            ],
            options={
                'verbose_name': 'game',
                'verbose_name_plural': 'games',
                'ordering': ['scheduled'],
            },
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(default='', max_length=100, verbose_name='label')),
                ('season_name', models.CharField(default='', max_length=32, verbose_name='name')),
                ('season_type', models.CharField(default='', max_length=32, verbose_name='type')),
            ],
            options={
                'verbose_name': 'season',
                'verbose_name_plural': 'seasons',
            },
        ),
        migrations.CreateModel(
            name='Venue',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('venue_id', models.CharField(default='', max_length=40, verbose_name='venue ID')),
                ('name', models.CharField(default='', max_length=128, verbose_name='name')),
                ('country', models.CharField(blank=True, default='', max_length=32, verbose_name='country')),
                ('city', models.CharField(blank=True, default='', max_length=32, verbose_name='city')),
                ('state', models.CharField(blank=True, default='', max_length=32, verbose_name='state')),
                ('zip_code', models.CharField(blank=True, default='', max_length=10, verbose_name='ZIP Code')),
            ],
            options={
                'verbose_name': 'venue',
                'verbose_name_plural': 'venues',
            },
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_id', models.CharField(default='', max_length=40, verbose_name='team ID')),
                ('name', models.CharField(blank=True, default='', max_length=64, verbose_name='name')),
                ('market', models.CharField(blank=True, default='', max_length=64, verbose_name='market')),
                ('conference', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teams', to='sports.conference', verbose_name='conference')),
                ('division', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teams', to='sports.division', verbose_name='division')),
                ('venue', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teams', to='sports.venue', verbose_name='venue')),
            ],
            options={
                'verbose_name': 'team',
                'verbose_name_plural': 'teams',
                'ordering': ('name', 'division', 'conference'),
            },
        ),
        migrations.CreateModel(
            name='GameSummary',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('home_points', models.PositiveSmallIntegerField(default=0, verbose_name='home points')),
                ('away_points', models.PositiveSmallIntegerField(default=0, verbose_name='away points')),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='game', to='sports.game')),
            ],
            options={
                'verbose_name': 'summary',
                'verbose_name_plural': 'summaries',
            },
        ),
        migrations.CreateModel(
            name='GamePeriod',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sport_radar_period_id', models.CharField(default='', max_length=40, verbose_name='game period ID')),
                ('number', models.PositiveSmallIntegerField(default=0, verbose_name='number')),
                ('season', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='game_periods', to='sports.season', verbose_name='season')),
            ],
            options={
                'verbose_name': 'game period',
                'verbose_name_plural': 'game periods',
                'ordering': ('season', 'number'),
            },
        ),
        migrations.AddField(
            model_name='game',
            name='away',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='game_away', to='sports.team'),
        ),
        migrations.AddField(
            model_name='game',
            name='game_period',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='games', to='sports.gameperiod', verbose_name='game period'),
        ),
        migrations.AddField(
            model_name='game',
            name='home',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='game_home', to='sports.team'),
        ),
        migrations.AddField(
            model_name='game',
            name='venue',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='games', to='sports.venue', verbose_name='venue'),
        ),
        migrations.CreateModel(
            name='Broadcast',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('broadcast_type', models.CharField(default='', max_length=40, verbose_name='type')),
                ('broadcast_address', models.CharField(default='', max_length=64, verbose_name='address')),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sports.game', verbose_name='game')),
            ],
            options={
                'verbose_name': 'broadcast',
                'verbose_name_plural': 'broadcasts',
            },
        ),
    ]
