sys_auth_rule.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * @desc:菜单model
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu
  5. * @Date: 2022/3/11 14:53
  6. */
  7. package model
  8. type SysAuthRuleInfoRes struct {
  9. Id uint `orm:"id,primary" json:"id"` //
  10. Pid uint `orm:"pid" json:"pid"` // 父ID
  11. Name string `orm:"name,unique" json:"name"` // 规则名称
  12. Title string `orm:"title" json:"title"` // 规则名称
  13. Icon string `orm:"icon" json:"icon"` // 图标
  14. Condition string `orm:"condition" json:"condition"` // 条件
  15. Remark string `orm:"remark" json:"remark"` // 备注
  16. MenuType uint `orm:"menu_type" json:"menuType"` // 类型 0目录 1菜单 2按钮
  17. Weigh int `orm:"weigh" json:"weigh"` // 权重
  18. Status uint `orm:"status" json:"status"` // 状态
  19. AlwaysShow uint `orm:"always_show" json:"alwaysShow"` // 显示状态
  20. Path string `orm:"path" json:"path"` // 路由地址
  21. JumpPath string `orm:"jump_path" json:"jumpPath"` // 跳转路由
  22. Component string `orm:"component" json:"component"` // 组件路径
  23. IsFrame uint `orm:"is_frame" json:"isFrame"` // 是否外链 1是 0否
  24. ModuleType string `orm:"module_type" json:"moduleType"` // 所属模块
  25. ModelId uint `orm:"model_id" json:"modelId"` // 模型ID
  26. }
  27. type UserMenu struct {
  28. Id uint `json:"id"`
  29. Pid uint `json:"pid"`
  30. Index string `json:"index"`
  31. Name string `json:"name"`
  32. MenuName string `json:"menuName"`
  33. Component string `json:"component"`
  34. Path string `json:"path"`
  35. *MenuMeta `json:"meta"`
  36. }
  37. type UserMenus struct {
  38. *UserMenu `json:""`
  39. Children []*UserMenus `json:"children"`
  40. }
  41. type MenuMeta struct {
  42. Icon string `json:"icon"`
  43. Title string `json:"title"`
  44. IsLink string `json:"isLink"`
  45. IsHide bool `json:"isHide"`
  46. IsKeepAlive bool `json:"isKeepAlive"`
  47. IsAffix bool `json:"isAffix"`
  48. IsIframe bool `json:"isIframe"`
  49. }