@@ -52,9 +52,9 @@ class User(BaseUser, table=True):
52
52
class BaseRole (PkMixin , CUDTimeMixin ):
53
53
__tablename__ = "auth_role"
54
54
55
- key : str = Field (title = "角色标识 " , max_length = 40 , unique = True , index = True , nullable = False )
56
- name : str = Field (default = "" , title = "角色名称 " , max_length = 40 )
57
- desc : str = Field (default = "" , title = "角色描述 " , max_length = 400 , amis_form_item = "textarea" )
55
+ key : str = Field (title = "Role ID " , max_length = 40 , unique = True , index = True , nullable = False ) # 角色标识
56
+ name : str = Field (default = "" , title = "Role Name " , max_length = 40 ) # 角色名称
57
+ desc : str = Field (default = "" , title = "Role description " , max_length = 400 , amis_form_item = "textarea" ) # 角色描述
58
58
59
59
60
60
class Role (BaseRole , table = True ):
@@ -110,7 +110,7 @@ def __repr__(self) -> str:
110
110
111
111
UserRoleNameLabel = LabelField (
112
112
CasbinSubjectRolesQuery .c .role_names .label ("role_names" ),
113
- field = Field ("" , title = "权限角色 " ),
113
+ field = Field ("" , title = "Permission role " ), # 权限角色
114
114
)
115
115
116
116
@@ -119,12 +119,14 @@ class LoginHistory(PkMixin, CreateTimeMixin, table=True):
119
119
120
120
__tablename__ = "auth_login_history"
121
121
122
- user_id : Optional [int ] = Field (None , title = "用户ID" )
123
- login_name : str = Field ("" , title = "登录名" , max_length = 20 )
124
- ip : str = Field ("" , title = "登录IP" , max_length = 20 )
125
- ip_info : str = Field ("" , title = "IP信息" , max_length = 255 )
126
- client : str = Field ("" , title = "客户端" , max_length = 20 )
127
- user_agent : str = Field ("" , title = "浏览器" , max_length = 400 )
128
- login_type : str = Field ("" , title = "登录类型" , max_length = 20 )
129
- login_status : str = Field ("登录成功" , title = "登录状态" , max_length = 20 , description = "登录成功,密码错误,账号被锁定等" )
130
- forwarded_for : str = Field ("" , title = "转发IP" , max_length = 60 )
122
+ user_id : Optional [int ] = Field (None , title = "User ID" ) # 用户ID
123
+ login_name : str = Field ("" , title = "Login name" , max_length = 20 ) # 登录名
124
+ ip : str = Field ("" , title = "User IP" , max_length = 20 ) # 登录IP
125
+ ip_info : str = Field ("" , title = "IP information" , max_length = 255 ) # IP信息
126
+ client : str = Field ("" , title = "Client" , max_length = 20 ) # 客户端
127
+ user_agent : str = Field ("" , title = "User-agent" , max_length = 400 ) # 浏览器
128
+ login_type : str = Field ("" , title = "Login type" , max_length = 20 ) # 登录类型
129
+ login_status : str = Field ("Login status" , title = "Login status" , max_length = 20 ,
130
+ description = "Successful login, incorrect password, account locked, etc." ) # 登录成功,
131
+ # 登录成功,密码错误,账号被锁定等
132
+ forwarded_for : str = Field ("" , title = "Forward IP" , max_length = 60 ) # 转发IP
0 commit comments