mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
refactor: json tag完善
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package form
|
||||
|
||||
type AccountCreateForm struct {
|
||||
Id uint64
|
||||
Id uint64 `json:"id"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Username string `json:"username" binding:"required,min=4,max=16"`
|
||||
Password string `json:"password"`
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package form
|
||||
|
||||
type ConfigForm struct {
|
||||
Id int
|
||||
Name string
|
||||
Key string
|
||||
Params string
|
||||
Value string
|
||||
Id int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key"`
|
||||
Params string `json:"params"`
|
||||
Value string `json:"value"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ package form
|
||||
type LoginForm struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `binding:"required"`
|
||||
Captcha string
|
||||
Cid string
|
||||
Captcha string `json:"captcha"`
|
||||
Cid string `json:"cid"`
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package form
|
||||
|
||||
type ResourceForm struct {
|
||||
Pid int
|
||||
Id int
|
||||
Code string `binding:"required"`
|
||||
Name string `binding:"required"`
|
||||
Type int `binding:"required,oneof=1 2"`
|
||||
Weight int
|
||||
Meta map[string]any
|
||||
Pid int `json:"pid"`
|
||||
Id int `json:"id"`
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Type int `json:"type" binding:"required,oneof=1 2"`
|
||||
Weight int `json:"weight"`
|
||||
Meta map[string]any `json:"meta"`
|
||||
}
|
||||
|
||||
type MenuResourceMeta struct {
|
||||
RouteName string `binding:"required"`
|
||||
Component string `binding:"required"`
|
||||
Redirect string
|
||||
Path string `binding:"required"`
|
||||
IsKeepAlive bool //
|
||||
IsHide bool // 是否在菜单栏显示,默认显示
|
||||
IsAffix bool // tag标签是否不可删除
|
||||
IsIframe bool
|
||||
Link string
|
||||
RouteName string `json:"routeName" binding:"required"`
|
||||
Component string `json:"component" binding:"required"`
|
||||
Redirect string `json:"redirect"`
|
||||
Path string `json:"path" binding:"required"`
|
||||
IsKeepAlive bool `json:"isKeepAlive"` //
|
||||
IsHide bool `json:"isHide"` // 是否在菜单栏显示,默认显示
|
||||
IsAffix bool `json:"isAffix"` // tag标签是否不可删除
|
||||
IsIframe bool `json:"isIframe"`
|
||||
Link string `json:"link"`
|
||||
}
|
||||
|
||||
@@ -2,21 +2,21 @@ package form
|
||||
|
||||
// 分配角色资源表单信息
|
||||
type RoleResourceForm struct {
|
||||
Id int
|
||||
ResourceIds string
|
||||
Id int `json:"id"`
|
||||
ResourceIds string `json:"resourceIds"`
|
||||
}
|
||||
|
||||
// 保存角色信息表单
|
||||
type RoleForm struct {
|
||||
Id int
|
||||
Id int `json:"id"`
|
||||
Status int `json:"status"` // 1:可用;-1:不可用
|
||||
Name string `binding:"required"`
|
||||
Code string `binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Code string `json:"code" binding:"required"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// 账号分配角色表单
|
||||
type AccountRoleForm struct {
|
||||
Id int `binding:"required"`
|
||||
RoleIds string
|
||||
Id int `json:"id" binding:"required"`
|
||||
RoleIds string `json:"roleIds"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user