# Generated by Discord Obfuscate on 2026-02-22

# Django
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("discord_obfuscate", "0004_role_color_assignment_obfuscation"),
    ]

    operations = [
        migrations.CreateModel(
            name="DiscordRoleOrderConfig",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "enabled",
                    models.BooleanField(
                        default=False,
                        help_text="Enable manual role ordering during the rotation task.",
                    ),
                ),
                (
                    "bot_role_id",
                    models.BigIntegerField(
                        blank=True,
                        help_text=(
                            "Discord role ID for the bot's highest role "
                            "(locks roles above it)."
                        ),
                        null=True,
                    ),
                ),
                (
                    "reorder_mode",
                    models.CharField(
                        choices=[
                            ("desired", "Reorder to desired configuration at next reorder task"),
                            ("shuffle", "Randomly reorganize unlocked roles"),
                        ],
                        default="desired",
                        help_text=(
                            "Controls how unlocked roles are positioned during the "
                            "reorder task."
                        ),
                        max_length=16,
                    ),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Discord Role Order Config",
            },
        ),
        migrations.CreateModel(
            name="DiscordRoleOrder",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("role_id", models.BigIntegerField(unique=True)),
                ("role_name", models.CharField(blank=True, default="", max_length=100)),
                ("role_color", models.CharField(blank=True, default="", max_length=7)),
                ("sort_order", models.PositiveIntegerField(default=0)),
                ("locked", models.BooleanField(default=False)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Discord Role Order",
                "verbose_name_plural": "Discord Role Orders",
                "ordering": ["sort_order", "role_name"],
            },
        ),
    ]
