sys_role.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. Fill this file as you wish.
  3. // ==========================================================================
  4. package model
  5. import (
  6. "dashoo.cn/micro/app/model/internal"
  7. "dashoo.cn/opms_libary/request"
  8. )
  9. // SysRole is the golang structure for table sys_role.
  10. type SysRole internal.SysRole
  11. // Fill with you ideas below.
  12. type SysRoleReq struct {
  13. RoleName string `json:"roleName" v:"required#状态不能为空"` // 角色名称
  14. RoleKey string `json:"roleKey" v:"required#状态不能为空"` // 角色权限字符串
  15. Status string `json:"status" v:"required|in:10,20#状态不能为空|状态只能为10或20"` // 角色状态(10正常20停用)
  16. MenuCheckStrictly string `json:"menuCheckStrictly"` // 菜单树选择项是否关联显示
  17. DeptCheckStrictly string `json:"deptCheckStrictly"` // 部门树选择项是否关联显示
  18. DataScope string `json:"dataScope"` // 数据范围;(10:全部数据权限 20:自定数据权限 30:本部门数据权限 40:本部门及以下数据权限)
  19. Sort int `json:"sort"` // 显示顺序
  20. Remark string `son:"remark"` // 备注
  21. MenuIds []int `json:"menuIds,omitempty"`
  22. }
  23. type UpdateSysRoleReq struct {
  24. Id int `json:"id" v:"required#角色ID不能为空"` // 角色ID
  25. SysRoleReq
  26. }
  27. // SelectPageReq 分页请求参数
  28. type SelectPageReq struct {
  29. RoleName string `p:"roleName"` //参数名称
  30. Status string `p:"status"` //状态
  31. request.PageReq
  32. }
  33. // StatusSetReq 修改状态参数
  34. type StatusSetReq struct {
  35. RoleId uint `p:"roleId" v:"required#角色ID不能为空"`
  36. Status uint `p:"status" v:"required#状态不能为空"`
  37. }
  38. // DataScopeReq 角色数据授权参数
  39. type DataScopeReq struct {
  40. RoleId uint `p:"roleId" v:"required#角色ID不能为空"`
  41. DataScope uint `p:"dataScope" v:"required#权限范围不能为空"`
  42. DeptIds []uint `p:"deptIds"`
  43. }