蛋蛋星球 后台端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

92 行
3.2 KiB

  1. package md
  2. import (
  3. "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
  4. )
  5. type RoleListResp struct {
  6. Data model.Role `json:"data"`
  7. AdminList []struct {
  8. Name string `json:"name"`
  9. } `json:"admin_list"`
  10. }
  11. type UpdateRoleStateReq struct {
  12. RoleId int `json:"role_id" binding:"required" label:"id"`
  13. State int `json:"state" binding:"required" label:"状态"`
  14. }
  15. type AddRoleReq struct {
  16. Name string `json:"name" binding:"required" label:"名称"`
  17. Memo string `json:"memo" binding:"required" label:"备注"`
  18. }
  19. type UpdateRoleReq struct {
  20. RoleId int `json:"role_id" binding:"required" label:"id"`
  21. Name string `json:"name" binding:"required" label:"名称"`
  22. Memo string `json:"memo" binding:"required" label:"备注"`
  23. }
  24. type RoleBindPermissionGroupReq struct {
  25. RoleId int `json:"role_id" binding:"required" label:"id"`
  26. PermissionIds []int `json:"permission_ids" label:"权限组id"`
  27. }
  28. type PermissionGroupListResp struct {
  29. Id int `json:"id"`
  30. Name string `json:"name"` //菜单名称
  31. Key string `json:"key"` //唯一标识符
  32. State int `json:"state"`
  33. ParentId int `json:"parent_id"` //父级id,为0则代表没有父级
  34. CreateAt string `json:"create_at"`
  35. UpdateAt string `json:"update_at"`
  36. IsCheck bool `json:"is_check"` //是否用用
  37. SubPermissionGroupList []PermissionGroupListResp `json:"sub_permission_group_list"` //子集菜单
  38. }
  39. type AdminListReq struct {
  40. Limit int `json:"limit"`
  41. Page int `json:"page" `
  42. UserName string `json:"username"`
  43. State int `json:"state"`
  44. }
  45. type AdminListResp struct {
  46. AdmId int `json:"adm_id"`
  47. Username string `json:"username"`
  48. State int `json:"state"`
  49. IsSuperAdministrator int `json:"is_super_administrator"`
  50. Memo string `json:"memo"`
  51. CreateAt string `json:"create_at"`
  52. UpdateAt string `json:"update_at"`
  53. RoleList []string `json:"role_list"`
  54. }
  55. type UpdateAdminStateReq struct {
  56. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  57. State int `json:"state" binding:"required" label:"状态"`
  58. }
  59. type AddAdminReq struct {
  60. Username string `json:"username" binding:"required" label:"名称"`
  61. Password string `json:"password" binding:"required" label:"密码"`
  62. Memo string `json:"memo" label:"备注"`
  63. }
  64. type UpdateAdminReq struct {
  65. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  66. Username string `json:"username" binding:"required" label:"名称"`
  67. Password string `json:"password" binding:"required" label:"密码"`
  68. Memo string `json:"memo" label:"备注"`
  69. }
  70. type BindAdminRoleReq struct {
  71. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  72. RoleIds []int `json:"role_ids" label:"角色id"`
  73. }
  74. type BindAdminWithEnterpriseReq struct {
  75. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  76. Ids []int `json:"ids" label:"记录id"`
  77. }