# Generated by Django 5.0.6 on 2024-11-05 12:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Angler',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('redact', models.BooleanField()),
            ],
            options={
                'verbose_name': 'angler',
                'verbose_name_plural': 'anglers',
            },
        ),
        migrations.CreateModel(
            name='LeagueRule',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('ranking_system', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('points_allocation', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('points_awarded', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('place_secondly_by_weight', models.BooleanField()),
                ('team_places_secondly_by_section', models.BooleanField()),
                ('section_placed_positions', models.IntegerField()),
                ('worst_place_limits', models.BooleanField()),
                ('attendance_points', models.IntegerField()),
                ('did_not_weigh', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('did_not_weigh_value', models.IntegerField()),
                ('left_early', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('left_early_value', models.IntegerField()),
                ('did_not_book', models.IntegerField()),
                ('disqualification', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('disqualification_value', models.IntegerField()),
                ('best_league_sessions', models.IntegerField()),
                ('worst_league_sessions', models.IntegerField()),
                ('match_placed_positions', models.IntegerField()),
            ],
            options={
                'verbose_name': 'league rule',
                'verbose_name_plural': 'league rules',
            },
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=384)),
                ('meeting_point', models.CharField(max_length=1024)),
                ('use_metric', models.BooleanField()),
                ('allow_in_tournaments', models.BooleanField()),
                ('start_datetime', models.DateTimeField()),
                ('end_datetime', models.DateTimeField()),
                ('draw_datetime', models.DateTimeField()),
                ('type', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('competitor_type', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
            ],
            options={
                'verbose_name': 'match',
                'verbose_name_plural': 'matches',
            },
        ),
        migrations.CreateModel(
            name='Sponsor',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('url', models.URLField()),
                ('image', models.ImageField(upload_to='')),
            ],
            options={
                'verbose_name': 'sponsor',
                'verbose_name_plural': 'sponsors',
            },
        ),
        migrations.CreateModel(
            name='Venue',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=384)),
                ('extra_notes', models.CharField(max_length=1028)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('profile_picture', models.ImageField(upload_to='')),
                ('banner_picture', models.ImageField(upload_to='')),
                ('type', models.PositiveSmallIntegerField(choices=[(0, 'Fishery'), (1, 'Club'), (2, 'Private')])),
            ],
            options={
                'verbose_name': 'venue',
                'verbose_name_plural': 'venues',
            },
        ),
        migrations.CreateModel(
            name='VenueAddress',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('street_number', models.IntegerField()),
                ('street_address', models.CharField(max_length=256)),
                ('town', models.CharField(max_length=256)),
                ('county', models.CharField(max_length=256)),
                ('post_code', models.CharField(max_length=32)),
                ('satnav_post_code', models.CharField(max_length=32)),
                ('country', models.CharField(max_length=128)),
                ('latitude', models.DecimalField(decimal_places=16, max_digits=22)),
                ('longitude', models.DecimalField(decimal_places=16, max_digits=22)),
            ],
            options={
                'verbose_name': 'venue address',
                'verbose_name_plural': 'venue addresses',
            },
        ),
        migrations.CreateModel(
            name='VenueContacts',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('phone_number', models.CharField(max_length=64)),
                ('email_address', models.EmailField(max_length=254)),
                ('website_url', models.URLField()),
                ('facebook_url', models.URLField()),
                ('twitter_url', models.URLField()),
                ('instagram_url', models.URLField()),
            ],
            options={
                'verbose_name': 'venue contacts',
                'verbose_name_plural': 'venue contacts',
            },
        ),
        migrations.CreateModel(
            name='Waters',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('pegs_from', models.IntegerField()),
                ('pegs_to', models.IntegerField()),
                ('map', models.ImageField(upload_to='')),
                ('type', models.PositiveSmallIntegerField(choices=[(0, 'Commercial Water'), (1, 'Natural Still Water'), (2, 'Canal'), (3, 'River'), (4, 'Loch')])),
                ('fish_types', models.PositiveSmallIntegerField(choices=[(0, 'Coarse'), (1, 'Specimen Carp'), (2, 'Game'), (3, 'Predator')])),
            ],
            options={
                'verbose_name': 'waters',
                'verbose_name_plural': 'waters',
            },
        ),
        migrations.CreateModel(
            name='AnglerGroup',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('type', models.PositiveSmallIntegerField(choices=[(0, 'choice 1'), (1, 'choice 2'), (2, 'choice 3')])),
                ('anglers', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.angler')),
            ],
            options={
                'verbose_name': 'angler group',
                'verbose_name_plural': 'angler groups',
            },
        ),
        migrations.CreateModel(
            name='League',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=384)),
                ('extra_notes', models.CharField(max_length=1028)),
                ('profile_picture', models.ImageField(upload_to='')),
                ('banner_picture', models.ImageField(upload_to='')),
                ('anglers', models.ManyToManyField(to='apps_home.angler')),
                ('rules', models.ManyToManyField(to='apps_home.leaguerule')),
                ('matches', models.ManyToManyField(to='apps_home.match')),
            ],
            options={
                'verbose_name': 'league',
                'verbose_name_plural': 'leagues',
            },
        ),
        migrations.CreateModel(
            name='LeagueResult',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('total_weight', models.CharField(max_length=64)),
                ('matches', models.IntegerField()),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('angler', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.angler')),
                ('league', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.league')),
                ('sponsor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='apps_home.sponsor')),
            ],
            options={
                'verbose_name': 'league result',
                'verbose_name_plural': 'league results',
            },
        ),
        migrations.AddField(
            model_name='match',
            name='venue',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.venue'),
        ),
        migrations.AddField(
            model_name='venue',
            name='address',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.venueaddress'),
        ),
        migrations.AddField(
            model_name='venue',
            name='contacts',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.venuecontacts'),
        ),
        migrations.AddField(
            model_name='venue',
            name='waters',
            field=models.ManyToManyField(to='apps_home.waters'),
        ),
        migrations.AddField(
            model_name='match',
            name='waters',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps_home.waters'),
        ),
    ]
