# Generated by Django 6.0.6 on 2026-08-21 20:37

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


class Migration(migrations.Migration):

    dependencies = [
        ('events', '0023_event_deadline_reminder_sent_at'),
        ('members', '0006_parentclaim_submitted_by_user'),
        ('teams', '0012_alter_refereelevel_options_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Lineup',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('published_at', models.DateTimeField(blank=True, null=True, verbose_name='published at')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_lineups', to='members.member', verbose_name='created by')),
                ('event', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='lineup', to='events.event', verbose_name='event')),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lineups', to='teams.team', verbose_name='team')),
            ],
            options={
                'verbose_name': 'line-up',
                'verbose_name_plural': 'line-ups',
            },
        ),
        migrations.CreateModel(
            name='LineupUnit',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('label', models.CharField(max_length=100, verbose_name='label')),
                ('ordering', models.PositiveSmallIntegerField(default=0, verbose_name='ordering')),
                ('lineup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='units', to='events.lineup', verbose_name='line-up')),
            ],
            options={
                'verbose_name': 'line-up unit',
                'verbose_name_plural': 'line-up units',
                'ordering': ['ordering'],
            },
        ),
        migrations.CreateModel(
            name='LineupSlot',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('ordering', models.PositiveSmallIntegerField(default=0, verbose_name='ordering')),
                ('member', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lineup_slots', to='members.member', verbose_name='member')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slots', to='events.lineupunit', verbose_name='unit')),
            ],
            options={
                'verbose_name': 'line-up slot',
                'verbose_name_plural': 'line-up slots',
                'ordering': ['ordering'],
            },
        ),
    ]
