# Generated by Django 4.2 on 2024-01-14 00:45

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('channels', '0002_remove_network_channel_name_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChannelNetworkMembership',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='UUID')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated at')),
                ('channel_name', models.CharField(blank=True, help_text='Name of the TV Network (optional)', max_length=200, unique=True)),
                ('channel_number', models.PositiveIntegerField(help_text='Channel Number associated with this Network', unique=True)),
                ('channel', models.ForeignKey(help_text='The TV Channel associated with this membership', on_delete=django.db.models.deletion.CASCADE, related_name='channel_memberships', to='channels.channel')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL, verbose_name='Created by')),
                ('network', models.ForeignKey(help_text='The TV Network associated with this membership', on_delete=django.db.models.deletion.CASCADE, related_name='network_memberships', to='channels.network')),
                ('updated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL, verbose_name='Updated by')),
            ],
            options={
                'unique_together': {('channel', 'network')},
            },
        ),
    ]
