# Generated by Django 6.0.6 on 2026-07-12 21:43

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


class Migration(migrations.Migration):

    dependencies = [
        ('club', '0008_alter_clubmembership_unique_together_and_more'),
        ('members', '0002_alter_familymembership_unique_together_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='ClubRole',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('role', models.CharField(choices=[('admin', 'admin'), ('member', 'member'), ('editor', 'editor')], default='member', max_length=250, verbose_name='role')),
                ('club', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)ss', to='club.club')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='roles', to='members.member', verbose_name='member')),
            ],
            options={
                'verbose_name': 'club role',
                'verbose_name_plural': 'club roles',
                'ordering': ['club', 'member__last_name', 'member__first_name'],
                'constraints': [models.UniqueConstraint(fields=('club', 'member'), name='unique_member_per_club')],
            },
        ),
    ]
