sys_role.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. Id int `json:"id"` // 角色ID
  14. RoleName string `json:"roleName"` // 角色名称
  15. RoleKey string `json:"roleKey"` // 角色权限字符串
  16. DataScope string `json:"dataScope"` // 数据范围;(10:全部数据权限 20:自定数据权限 30:本部门数据权限 40:本部门及以下数据权限)
  17. Status string `json:"status"` // 角色状态(10正常20停用)
  18. Sort int `json:"sort"` // 显示顺序
  19. Remark string `son:"remark"` // 备注
  20. }
  21. // 分页请求参数
  22. type SelectPageReq struct {
  23. RoleName string `p:"roleName"` //参数名称
  24. Status string `p:"status"` //状态
  25. request.PageReq
  26. }
  27. // 修改状态参数
  28. type StatusSetReq struct {
  29. RoleId uint `p:"roleId" v:"required#角色ID不能为空"`
  30. Status uint `p:"status" v:"required#状态不能为空"`
  31. }
  32. // 角色数据授权参数
  33. type DataScopeReq struct {
  34. RoleId uint `p:"roleId" v:"required#角色ID不能为空"`
  35. DataScope uint `p:"dataScope" v:"required#权限范围不能为空"`
  36. DeptIds []uint `p:"deptIds"`
  37. }