| 123456789101112131415161718192021222324252627282930313233343536 |
- package schema
- // RoleMenu 角色菜单对象
- type RoleMenu struct {
- RecordId string `json:"record_id"` // 记录id
- RoleId string `json:"role_id"` // 角色id
- MenuId string `json:"menu_id"` // 菜单Id
- MenuName string `json:"menu_name"` // 菜单名称
- }
- // RoleMenuQueryParam 查询条件
- type RoleMenuQueryParam struct {
- RoleId string `json:"role_id"`
- RoleIds string `json:"role_ids"`
- }
- // RoleMenuQueryOptions RoleMenu对象查询可选参数项
- type RoleMenuQueryOptions struct {
- PageParam *PaginationParam // 分页参数
- }
- // RoleMenuQueryResult RoleMenu对象查询结果
- type RoleMenuQueryResult struct {
- Data RoleMenus
- PageResult *PaginationResult
- }
- type RoleMenus []*RoleMenu
- func (a RoleMenus) ToMenuIds() []string {
- menuIds := make([]string, len(a))
- for k, v := range a {
- menuIds[k] = v.MenuId
- }
- return menuIds
- }
|