sys_role.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * @desc:角色api
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu<yxh669@qq.com>
  5. * @Date: 2022/3/30 9:16
  6. */
  7. package system
  8. import (
  9. "github.com/gogf/gf/v2/frame/g"
  10. commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
  11. "github.com/tiger1103/gfast/v3/internal/app/system/model"
  12. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  13. )
  14. type RoleListReq struct {
  15. g.Meta `path:"/role/list" tags:"角色管理" method:"get" summary:"角色列表"`
  16. RoleName string `p:"roleName"` //参数名称
  17. Status string `p:"status"` //状态
  18. commonApi.PageReq
  19. }
  20. type RoleListRes struct {
  21. g.Meta `mime:"application/json"`
  22. commonApi.ListRes
  23. List []*entity.SysRole `json:"list"`
  24. }
  25. type RoleGetParamsReq struct {
  26. g.Meta `path:"/role/getParams" tags:"角色管理" method:"get" summary:"角色编辑参数"`
  27. }
  28. type RoleGetParamsRes struct {
  29. g.Meta `mime:"application/json"`
  30. Menu []*model.SysAuthRuleInfoRes `json:"menu"`
  31. }
  32. type RoleAddReq struct {
  33. g.Meta `path:"/role/add" tags:"角色管理" method:"post" summary:"添加角色"`
  34. Name string `p:"name" v:"required#角色名称不能为空"`
  35. Status uint `p:"status" `
  36. ListOrder uint `p:"listOrder" `
  37. Remark string `p:"remark" `
  38. MenuIds []uint `p:"menuIds"`
  39. }
  40. type RoleAddRes struct {
  41. }