mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
refactor: 后端包结构重构、去除无用的文件
This commit is contained in:
9
server/internal/sys/api/form/account.go
Normal file
9
server/internal/sys/api/form/account.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package form
|
||||
|
||||
type AccountCreateForm struct {
|
||||
Username *string `json:"username" binding:"required,min=4,max=16"`
|
||||
}
|
||||
|
||||
type AccountUpdateForm struct {
|
||||
Password *string `json:"password" binding:"min=6,max=16"`
|
||||
}
|
||||
9
server/internal/sys/api/form/form.go
Normal file
9
server/internal/sys/api/form/form.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package form
|
||||
|
||||
// 登录表单
|
||||
type LoginForm struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `binding:"required"`
|
||||
Captcha string `binding:"required"`
|
||||
Cid string `binding:"required"`
|
||||
}
|
||||
23
server/internal/sys/api/form/resource.go
Normal file
23
server/internal/sys/api/form/resource.go
Normal file
@@ -0,0 +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]interface{}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
22
server/internal/sys/api/form/role.go
Normal file
22
server/internal/sys/api/form/role.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package form
|
||||
|
||||
// 分配角色资源表单信息
|
||||
type RoleResourceForm struct {
|
||||
Id int
|
||||
ResourceIds string
|
||||
}
|
||||
|
||||
// 保存角色信息表单
|
||||
type RoleForm struct {
|
||||
Id int
|
||||
Status int `json:"status"` // 1:可用;-1:不可用
|
||||
Name string `binding:"required"`
|
||||
Code string `binding:"required"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// 账号分配角色表单
|
||||
type AccountRoleForm struct {
|
||||
Id int `binding:"required"`
|
||||
RoleIds string
|
||||
}
|
||||
Reference in New Issue
Block a user