feat(system): 角色模型添加工作流支持

- 引入 FlowBaseModel 以支持工作流功能
- 使 Role 模型继承 CoreModel 和 FlowBaseModel
This commit is contained in:
1638245306
2025-03-28 18:24:13 +08:00
parent 7a152d3591
commit 8eacc4aad3

View File

@@ -9,8 +9,8 @@ from django.core.exceptions import ObjectDoesNotExist, ValidationError
from application import dispatch from application import dispatch
from dvadmin.utils.models import CoreModel, table_prefix, get_custom_app_models from dvadmin.utils.models import CoreModel, table_prefix, get_custom_app_models
from dvadmin3_flow.base_model import FlowBaseModel
class Role(CoreModel): class Role(CoreModel,FlowBaseModel):
name = models.CharField(max_length=64, verbose_name="角色名称", help_text="角色名称") name = models.CharField(max_length=64, verbose_name="角色名称", help_text="角色名称")
key = models.CharField(max_length=64, unique=True, verbose_name="权限字符", help_text="权限字符") key = models.CharField(max_length=64, unique=True, verbose_name="权限字符", help_text="权限字符")
sort = models.IntegerField(default=1, verbose_name="角色顺序", help_text="角色顺序") sort = models.IntegerField(default=1, verbose_name="角色顺序", help_text="角色顺序")