# Generated by Django 5.2.8 on 2025-12-06 15:03

import apps.sigils.fields
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("awg", "0001_initial"),
        ("chats", "0002_initial"),
        ("core", "0001_initial"),
        ("groups", "0002_initial"),
        ("nodes", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="InviteLead",
            fields=[],
            options={
                "verbose_name": "Invite Lead",
                "verbose_name_plural": "Invite Leads",
                "proxy": True,
                "indexes": [],
                "constraints": [],
            },
            bases=("core.invitelead",),
        ),
        migrations.CreateModel(
            name="PowerLead",
            fields=[],
            options={
                "verbose_name": "Power Lead",
                "verbose_name_plural": "Power Leads",
                "proxy": True,
                "indexes": [],
                "constraints": [],
            },
            bases=("awg.powerlead",),
        ),
        migrations.CreateModel(
            name="SlackBotProfile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                (
                    "team_id",
                    models.CharField(
                        help_text="Slack workspace team identifier (starts with T).",
                        max_length=32,
                    ),
                ),
                (
                    "bot_user_id",
                    models.CharField(
                        blank=True,
                        help_text="Slack bot user identifier (starts with U or B).",
                        max_length=32,
                    ),
                ),
                (
                    "bot_token",
                    apps.sigils.fields.SigilShortAutoField(
                        help_text="Slack bot token used for authenticated API calls.",
                        max_length=255,
                    ),
                ),
                (
                    "signing_secret",
                    apps.sigils.fields.SigilShortAutoField(
                        help_text="Slack signing secret used to verify incoming requests.",
                        max_length=255,
                    ),
                ),
                (
                    "default_channels",
                    models.JSONField(
                        blank=True,
                        default=list,
                        help_text='Channel identifiers where Net Messages should be posted. Provide a JSON array of channel IDs (for example ["C01ABCDE"]).',
                    ),
                ),
                (
                    "is_enabled",
                    models.BooleanField(
                        default=True,
                        help_text="Disable to stop the bot from posting to Slack.",
                    ),
                ),
                (
                    "avatar",
                    models.ForeignKey(
                        blank=True,
                        help_text="Avatar that owns this profile when not linked directly to a user or group.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="chats.chatavatar",
                    ),
                ),
                (
                    "group",
                    models.OneToOneField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="groups.securitygroup",
                    ),
                ),
                (
                    "node",
                    models.OneToOneField(
                        blank=True,
                        help_text="Node that owns this Slack chatbot.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="slack_bot",
                        to="nodes.node",
                    ),
                ),
            ],
            options={
                "verbose_name": "Slack Chatbot",
                "verbose_name_plural": "Slack Chatbots",
            },
        ),
    ]
