sys_auth_rule.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * @desc:菜单api
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu<yxh669@qq.com>
  5. * @Date: 2022/3/18 10:27
  6. */
  7. package system
  8. import "github.com/gogf/gf/v2/frame/g"
  9. type RuleAddReq struct {
  10. g.Meta `path:"/menu/add" tags:"menu add" method:"post" summary:"添加菜单"`
  11. Authorization string `p:"Authorization" in:"header" dc:"Bearer {{token}}"`
  12. MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"`
  13. Pid uint `p:"parentId" v:"min:0"`
  14. Name string `p:"name" v:"required#请填写规则名称"`
  15. Title string `p:"menuName" v:"required|length:1,100#请填写标题|标题长度在:min到:max位"`
  16. Icon string `p:"icon"`
  17. Weigh int `p:"orderNum" `
  18. Condition string `p:"condition" `
  19. Remark string `p:"remark" `
  20. Status uint `p:"status" `
  21. AlwaysShow uint `p:"visible"`
  22. Path string `p:"path"`
  23. Component string `p:"component" v:"required-if:menuType,1#组件路径不能为空"`
  24. IsLink uint `p:"isLink"`
  25. IsIframe uint `p:"isIframe"`
  26. IsCached uint `p:"isCached"`
  27. ModuleType string `p:"moduleType"`
  28. ModelId uint `p:"modelId"`
  29. }
  30. type RuleAddRes struct {
  31. }