<reponame>alex-evans/fgolf
# Generated by Django 2.2.2 on 2019-08-05 01:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('email', models.CharField(max_length=200)),
                ('total_winnings', models.IntegerField(blank=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Tournament',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('file_name', models.CharField(blank=True, max_length=200)),
                ('start_date', models.DateField(verbose_name='start date')),
                ('end_date', models.DateField(verbose_name='end date')),
                ('leaderboard_url', models.CharField(blank=True, max_length=200)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='TournamentPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group', models.CharField(blank=True, max_length=1)),
                ('winnings', models.IntegerField(blank=True)),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Player')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
        ),
        migrations.CreateModel(
            name='TournamentPick',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_winnings', models.IntegerField(blank=True)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Person')),
                ('pick_a', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pick_a', to='tournaments.Player')),
                ('pick_b', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pick_b', to='tournaments.Player')),
                ('pick_c', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pick_c', to='tournaments.Player')),
                ('pick_d', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pick_d', to='tournaments.Player')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
        ),
        migrations.CreateModel(
            name='GroupDPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.TournamentPlayer')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
            options={
                'ordering': ['tournament', 'player'],
            },
        ),
        migrations.CreateModel(
            name='GroupCPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.TournamentPlayer')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
            options={
                'ordering': ['tournament', 'player'],
            },
        ),
        migrations.CreateModel(
            name='GroupBPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.TournamentPlayer')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
            options={
                'ordering': ['tournament', 'player'],
            },
        ),
        migrations.CreateModel(
            name='GroupAPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.TournamentPlayer')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournaments.Tournament')),
            ],
            options={
                'ordering': ['tournament', 'player'],
            },
        ),
    ]
