# Generated by Django 3.2.15 on 2022-10-20 04:53

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


class Migration(migrations.Migration):

    dependencies = [
        ("chats", "0003_channelsubscription_unread"),
        ("topics", "0012_topicmentionlink"),
    ]

    operations = [
        migrations.CreateModel(
            name="TopicChannelRelation",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "symbolic_relation",
                    models.BooleanField(
                        default=False,
                        help_text="If this is a symbolic relation, no members are given access to this channel unless they are explicitly added.",
                    ),
                ),
                (
                    "is_default",
                    models.BooleanField(
                        default=False,
                        help_text="Is this relation the default entry point for accessing the channel?",
                    ),
                ),
                (
                    "subscribe_members",
                    models.BooleanField(
                        default=True,
                        help_text="If enabled, all current and future topic members are subscribed to the channel.",
                        verbose_name="Automatically subscribe members to the channel",
                    ),
                ),
                (
                    "channel",
                    models.ForeignKey(
                        help_text="The channel that this relation corresponds to.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="chats.channel",
                    ),
                ),
                (
                    "topic",
                    models.ForeignKey(
                        help_text="The related topic that this channel belongs to.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="topics.topic",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
