55 lines
1.3 KiB
Go
55 lines
1.3 KiB
Go
package model
|
||
|
||
import "github.com/gogf/gf/v2/frame/g"
|
||
|
||
// Role 角色信息
|
||
type Role struct {
|
||
g.Meta `orm:"table:roles"`
|
||
Id int64 `json:"id" dc:"角色ID" orm:"id"`
|
||
Name string `json:"name" dc:"角色名称" orm:"name"`
|
||
Code string `json:"code" dc:"角色编码" orm:"code"`
|
||
Description string `json:"description" dc:"角色描述" orm:"description"`
|
||
Status int `json:"status" dc:"状态:1=启用,2=禁用" orm:"status"`
|
||
IsDeletable bool `json:"is_deletable" dc:"是否可删除:0=不可删除,1=可删除" orm:"is_deletable"`
|
||
}
|
||
|
||
// RoleCreateInput 创建角色输入参数
|
||
type RoleCreateInput struct {
|
||
Name string
|
||
Code string
|
||
Description string
|
||
Status int
|
||
}
|
||
|
||
// RoleUpdateInput 更新角色输入参数
|
||
type RoleUpdateInput struct {
|
||
Id int64
|
||
Name string
|
||
Code string
|
||
Description string
|
||
Status int
|
||
}
|
||
|
||
// RoleListInput 获取角色列表输入参数
|
||
type RoleListInput struct {
|
||
Page int
|
||
Size int
|
||
Status int
|
||
}
|
||
|
||
// RoleListOutput 获取角色列表输出参数
|
||
type RoleListOutput struct {
|
||
List []Role
|
||
Total int
|
||
}
|
||
|
||
// RoleGetByIdInput 根据ID获取角色输入参数
|
||
type RoleGetByIdInput struct {
|
||
Id int64
|
||
}
|
||
|
||
// RoleDeleteInput 删除角色输入参数
|
||
type RoleDeleteInput struct {
|
||
Id int64
|
||
}
|