# Generated by Django 5.2.1 on 2025-07-03 08:43

import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
import utils.utils
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("auth", "0012_alter_user_first_name_max_length"),
    ]

    operations = [
        migrations.CreateModel(
            name="DictType",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                (
                    "name",
                    models.CharField(
                        default="", max_length=100, verbose_name="字典名称"
                    ),
                ),
                (
                    "value",
                    models.CharField(
                        db_index=True,
                        default="",
                        max_length=100,
                        verbose_name="字典类型",
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="状态",
                    ),
                ),
                (
                    "deleted_time",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="删除时间"
                    ),
                ),
            ],
            options={
                "verbose_name": "字典类型",
                "verbose_name_plural": "字典类型",
                "db_table": "system_dict_type",
                "ordering": ["-id"],
            },
        ),
        migrations.CreateModel(
            name="LoginLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                (
                    "username",
                    models.CharField(db_comment="用户账号", default="", max_length=50),
                ),
                (
                    "result",
                    models.IntegerField(
                        choices=[(0, "失败"), (1, "成功")],
                        db_comment="登录结果",
                        default=1,
                    ),
                ),
                ("user_ip", models.CharField(db_comment="用户 IP", max_length=50)),
                (
                    "user_agent",
                    models.CharField(db_comment="浏览器 UA", max_length=512),
                ),
            ],
            options={
                "verbose_name": "系统访问记录",
                "verbose_name_plural": "系统访问记录",
                "db_table": "system_login_log",
                "ordering": ["-id"],
            },
        ),
        migrations.CreateModel(
            name="MenuMeta",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("title", models.CharField(db_comment="标题", max_length=200)),
                (
                    "icon",
                    models.CharField(blank=True, db_comment="图标", max_length=100),
                ),
                ("sort", models.IntegerField(db_comment="排序", default=0)),
                (
                    "affix_tab",
                    models.BooleanField(db_comment="固定标签页", default=False),
                ),
                (
                    "badge",
                    models.CharField(blank=True, db_comment="徽章文本", max_length=50),
                ),
                (
                    "badge_type",
                    models.CharField(blank=True, db_comment="徽章类型", max_length=20),
                ),
                (
                    "badge_variants",
                    models.CharField(blank=True, db_comment="徽章样式", max_length=20),
                ),
                ("iframe_src", models.URLField(blank=True, db_comment="内嵌页面URL")),
                ("link", models.URLField(blank=True, db_comment="外部链接")),
                (
                    "hide_in_menu",
                    models.BooleanField(db_comment="隐藏菜单", default=False),
                ),
                (
                    "hide_children_in_menu",
                    models.BooleanField(db_comment="隐藏子菜单", default=False),
                ),
            ],
            options={
                "verbose_name": "菜单元数据",
                "verbose_name_plural": "菜单元数据",
                "db_table": "system_menu_meta",
            },
        ),
        migrations.CreateModel(
            name="Post",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("code", models.CharField(db_comment="岗位编码", max_length=64)),
                ("name", models.CharField(db_comment="岗位名称", max_length=50)),
                ("sort", models.IntegerField(db_comment="显示顺序", default=0)),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="状态",
                    ),
                ),
            ],
            options={
                "verbose_name": "岗位信息表",
                "verbose_name_plural": "岗位信息表",
                "db_table": "system_post",
            },
        ),
        migrations.CreateModel(
            name="Role",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("name", models.CharField(max_length=100, verbose_name="角色名称")),
                (
                    "code",
                    models.CharField(
                        blank=True, max_length=100, verbose_name="角色标识"
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="角色状态",
                    ),
                ),
                (
                    "sort",
                    models.IntegerField(
                        default=0, help_text="数值越小越靠前", verbose_name="显示排序"
                    ),
                ),
                ("remark", models.TextField(blank=True, verbose_name="备注")),
            ],
            options={
                "verbose_name": "角色管理",
                "verbose_name_plural": "角色管理",
                "ordering": ["-create_time"],
            },
        ),
        migrations.CreateModel(
            name="Dept",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("name", models.CharField(max_length=100, verbose_name="部门名称")),
                (
                    "status",
                    models.SmallIntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=0,
                        verbose_name="部门状态",
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(auto_now_add=True, verbose_name="创建时间"),
                ),
                (
                    "sort",
                    models.IntegerField(
                        default=0, help_text="数值越小越靠前", verbose_name="显示排序"
                    ),
                ),
                (
                    "leader",
                    models.CharField(
                        blank=True, max_length=20, null=True, verbose_name="负责人"
                    ),
                ),
                (
                    "phone",
                    models.CharField(
                        blank=True, max_length=20, null=True, verbose_name="联系电话"
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True, max_length=254, null=True, verbose_name="邮箱"
                    ),
                ),
                ("remark", models.TextField(blank=True, verbose_name="备注")),
                (
                    "pid",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="children",
                        to="system.dept",
                        verbose_name="父部门 ID",
                    ),
                ),
            ],
            options={
                "verbose_name": "部门管理",
                "verbose_name_plural": "部门管理",
                "ordering": ["-create_time"],
            },
        ),
        migrations.CreateModel(
            name="DictData",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("sort", models.IntegerField(default=0, verbose_name="字典排序")),
                (
                    "label",
                    models.CharField(
                        default="", max_length=100, verbose_name="字典标签"
                    ),
                ),
                (
                    "value",
                    models.CharField(
                        default="", max_length=100, verbose_name="字典键值"
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="状态",
                    ),
                ),
                (
                    "color_type",
                    models.CharField(
                        blank=True, default="", max_length=100, verbose_name="颜色类型"
                    ),
                ),
                (
                    "css_class",
                    models.CharField(
                        blank=True, default="", max_length=100, verbose_name="css 样式"
                    ),
                ),
                (
                    "dict_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="dict_data",
                        to="system.dicttype",
                        verbose_name="字典类型",
                    ),
                ),
            ],
            options={
                "verbose_name": "字典数据",
                "verbose_name_plural": "字典数据",
                "db_table": "system_dict_data",
                "ordering": ["sort", "id"],
            },
        ),
        migrations.CreateModel(
            name="Menu",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                ("name", models.CharField(max_length=100, verbose_name="菜单名称")),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="状态",
                    ),
                ),
                (
                    "type",
                    models.CharField(
                        choices=[
                            ("catalog", "目录"),
                            ("menu", "菜单"),
                            ("button", "按钮"),
                            ("embedded", "内嵌页面"),
                            ("link", "外部链接"),
                        ],
                        max_length=20,
                        verbose_name="菜单类型",
                    ),
                ),
                (
                    "sort",
                    models.IntegerField(
                        default=0, help_text="数值越小越靠前", verbose_name="显示排序"
                    ),
                ),
                (
                    "path",
                    models.CharField(
                        blank=True, max_length=200, verbose_name="路由路径"
                    ),
                ),
                (
                    "component",
                    models.CharField(
                        blank=True, max_length=200, verbose_name="组件路径"
                    ),
                ),
                (
                    "auth_code",
                    models.CharField(
                        blank=True, max_length=100, verbose_name="权限编码"
                    ),
                ),
                (
                    "pid",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="children",
                        to="system.menu",
                        verbose_name="父菜单",
                    ),
                ),
                (
                    "meta",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="system.menumeta",
                        verbose_name="元数据",
                    ),
                ),
            ],
            options={
                "verbose_name": "菜单",
                "verbose_name_plural": "菜单管理",
                "ordering": ["meta__sort", "id"],
            },
        ),
        migrations.CreateModel(
            name="User",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("password", models.CharField(max_length=128, verbose_name="password")),
                (
                    "last_login",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="last login"
                    ),
                ),
                (
                    "is_superuser",
                    models.BooleanField(
                        default=False,
                        help_text="Designates that this user has all permissions without explicitly assigning them.",
                        verbose_name="superuser status",
                    ),
                ),
                (
                    "username",
                    models.CharField(
                        error_messages={
                            "unique": "A user with that username already exists."
                        },
                        help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
                        max_length=150,
                        unique=True,
                        validators=[
                            django.contrib.auth.validators.UnicodeUsernameValidator()
                        ],
                        verbose_name="username",
                    ),
                ),
                (
                    "first_name",
                    models.CharField(
                        blank=True, max_length=150, verbose_name="first name"
                    ),
                ),
                (
                    "last_name",
                    models.CharField(
                        blank=True, max_length=150, verbose_name="last name"
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True, max_length=254, verbose_name="email address"
                    ),
                ),
                (
                    "is_staff",
                    models.BooleanField(
                        default=False,
                        help_text="Designates whether the user can log into this admin site.",
                        verbose_name="staff status",
                    ),
                ),
                (
                    "is_active",
                    models.BooleanField(
                        default=True,
                        help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
                        verbose_name="active",
                    ),
                ),
                (
                    "date_joined",
                    models.DateTimeField(
                        default=django.utils.timezone.now, verbose_name="date joined"
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True,
                        db_comment="创建时间",
                        help_text="创建时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                (
                    "mobile",
                    models.CharField(
                        db_comment="手机号",
                        max_length=11,
                        null=True,
                        validators=[utils.utils.validate_mobile],
                    ),
                ),
                (
                    "nickname",
                    models.CharField(
                        blank=True, db_comment="昵称", max_length=50, null=True
                    ),
                ),
                (
                    "gender",
                    models.SmallIntegerField(
                        blank=True, db_comment="性别", default=0, null=True
                    ),
                ),
                (
                    "language",
                    models.CharField(
                        blank=True,
                        db_comment="语言",
                        max_length=20,
                        null=True,
                        verbose_name="语言",
                    ),
                ),
                (
                    "city",
                    models.CharField(
                        blank=True,
                        db_comment="城市",
                        max_length=20,
                        null=True,
                        verbose_name="城市",
                    ),
                ),
                (
                    "province",
                    models.CharField(
                        blank=True,
                        db_comment="省份",
                        max_length=50,
                        null=True,
                        verbose_name="省份",
                    ),
                ),
                (
                    "country",
                    models.CharField(
                        blank=True,
                        db_comment="国家",
                        max_length=50,
                        null=True,
                        verbose_name="国家",
                    ),
                ),
                (
                    "avatar_url",
                    models.URLField(
                        blank=True, db_comment="头像", null=True, verbose_name="头像"
                    ),
                ),
                (
                    "status",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "启用")],
                        default=1,
                        verbose_name="状态",
                    ),
                ),
                (
                    "login_ip",
                    models.GenericIPAddressField(
                        blank=True, db_comment="最后登录IP", null=True
                    ),
                ),
                (
                    "groups",
                    models.ManyToManyField(
                        blank=True,
                        help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
                        related_name="user_set",
                        related_query_name="user",
                        to="auth.group",
                        verbose_name="groups",
                    ),
                ),
                (
                    "user_permissions",
                    models.ManyToManyField(
                        blank=True,
                        help_text="Specific permissions for this user.",
                        related_name="user_set",
                        related_query_name="user",
                        to="auth.permission",
                        verbose_name="user permissions",
                    ),
                ),
                (
                    "dept",
                    models.ManyToManyField(
                        blank=True,
                        db_constraint=False,
                        related_name="users",
                        to="system.dept",
                        verbose_name="部门",
                    ),
                ),
                (
                    "post",
                    models.ManyToManyField(
                        blank=True,
                        db_constraint=False,
                        related_name="users",
                        to="system.post",
                        verbose_name="岗位",
                    ),
                ),
                (
                    "role",
                    models.ManyToManyField(
                        blank=True,
                        db_constraint=False,
                        related_name="users",
                        to="system.role",
                        verbose_name="角色",
                    ),
                ),
            ],
            options={
                "verbose_name": "用户数据",
                "verbose_name_plural": "用户数据",
                "db_table": "system_users",
            },
            managers=[
                ("objects", django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name="RolePermission",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "remark",
                    models.CharField(
                        blank=True,
                        db_comment="备注",
                        help_text="备注",
                        max_length=256,
                        null=True,
                    ),
                ),
                (
                    "creator",
                    models.CharField(
                        blank=True,
                        db_comment="创建人",
                        help_text="创建人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "modifier",
                    models.CharField(
                        blank=True,
                        db_comment="修改人",
                        help_text="修改人",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "update_time",
                    models.DateTimeField(
                        auto_now=True,
                        db_comment="修改时间",
                        help_text="修改时间",
                        null=True,
                    ),
                ),
                (
                    "is_deleted",
                    models.BooleanField(db_comment="是否软删除", default=False),
                ),
                (
                    "create_time",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="权限关联时间"
                    ),
                ),
                (
                    "menu",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="system.menu",
                        verbose_name="菜单/权限",
                    ),
                ),
                (
                    "role",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="system.role",
                        verbose_name="角色",
                    ),
                ),
            ],
            options={
                "verbose_name": "角色权限关联",
                "verbose_name_plural": "角色权限关联",
                "db_table": "system_role_permission",
            },
        ),
        migrations.AddField(
            model_name="role",
            name="permissions",
            field=models.ManyToManyField(
                through="system.RolePermission",
                to="system.menu",
                verbose_name="关联权限",
            ),
        ),
    ]
