# Generated by Django 6.0.6 on 2026-08-06 13:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('club', '0018_club_sport_type'),
        ('teams', '0006_alter_position_ordering'),
    ]

    operations = [
        migrations.CreateModel(
            name='TeamPhoto',
            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)),
                ('image', models.ImageField(upload_to=teams.models.team_photo_path, verbose_name='image')),
                ('season', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='team_photos', to='club.season', verbose_name='season')),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='teams.team', verbose_name='team')),
            ],
            options={
                'verbose_name': 'team photo',
                'verbose_name_plural': 'team photos',
                'constraints': [models.UniqueConstraint(fields=('team', 'season'), name='unique_team_photo_per_season')],
            },
        ),
    ]
