# Generated by Django 4.2.27 on 2026-03-30 23:18

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("peizhi", "0009_ordertypemapping_dailydispatchstat_club"),
    ]

    operations = [
        migrations.CreateModel(
            name="ClubConfig",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "club_id",
                    models.CharField(
                        db_index=True, max_length=6, verbose_name="俱乐部ID"
                    ),
                ),
                (
                    "club_nickname",
                    models.CharField(
                        blank=True, default="", max_length=50, verbose_name="俱乐部昵称"
                    ),
                ),
                (
                    "club_avatar",
                    models.CharField(
                        blank=True,
                        default="",
                        max_length=500,
                        verbose_name="俱乐部头像地址",
                    ),
                ),
                (
                    "backend_domain",
                    models.CharField(
                        blank=True, default="", max_length=200, verbose_name="后台域名"
                    ),
                ),
                (
                    "chat_api_key",
                    models.CharField(
                        blank=True,
                        default="",
                        max_length=200,
                        verbose_name="聊天API密钥",
                    ),
                ),
                (
                    "chat_api_id",
                    models.CharField(
                        blank=True,
                        default="",
                        max_length=200,
                        verbose_name="聊天API ID",
                    ),
                ),
                (
                    "storage_bucket_domain",
                    models.CharField(
                        blank=True,
                        default="",
                        max_length=500,
                        verbose_name="存储桶域名",
                    ),
                ),
                (
                    "is_self",
                    models.SmallIntegerField(
                        choices=[(0, "对方"), (1, "我方")],
                        db_index=True,
                        default=0,
                        verbose_name="是否我方俱乐部",
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(auto_now_add=True, verbose_name="创建时间"),
                ),
                (
                    "update_time",
                    models.DateTimeField(auto_now=True, verbose_name="更新时间"),
                ),
            ],
            options={
                "verbose_name": "俱乐部配置",
                "verbose_name_plural": "俱乐部配置",
                "db_table": "club_config",
                "unique_together": {("club_id",)},
            },
        ),
        migrations.CreateModel(
            name="AccountPermission",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "account_id",
                    models.CharField(
                        db_index=True, max_length=11, verbose_name="账号ID"
                    ),
                ),
                ("permission_code", models.IntegerField(verbose_name="权限代码")),
                (
                    "is_enabled",
                    models.BooleanField(default=False, verbose_name="是否开启"),
                ),
            ],
            options={
                "verbose_name": "账号权限",
                "verbose_name_plural": "账号权限",
                "db_table": "account_permission",
                "unique_together": {("account_id", "permission_code")},
            },
        ),
    ]
