role_query_user.go
504 字节
package command
import "github.com/beego/beego/v2/core/validation"
// QueryRoleUserCommand 查询角色列表(关联用户)
type QueryRoleUserCommand struct {
CompanyId int64 `cname:"公司ID" json:"companyId"`
PageNumber int64 `cname:"分页页码" json:"pageNumber"`
PageSize int64 `cname:"分页数量" json:"pageSize"`
}
func (in *QueryRoleUserCommand) Valid(validation *validation.Validation) {
if in.CompanyId == 0 {
validation.SetError("companyId", "公司ID无效")
return
}
}