蛋蛋星球 后台端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

md_role.go 3.6 KiB

1 mese fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. Logo string `json:"logo" label:"左边图标"`
  19. Label string `json:"label" label:"身份标签"`
  20. SeoLogo string `json:"seo_logo" label:"seo"`
  21. SeoTitle string `json:"seo_title" label:"seo"`
  22. }
  23. type UpdateRoleReq struct {
  24. RoleId int `json:"role_id" binding:"required" label:"id"`
  25. Name string `json:"name" binding:"required" label:"名称"`
  26. Memo string `json:"memo" binding:"required" label:"备注"`
  27. Logo string `json:"logo" label:"左边图标"`
  28. Label string `json:"label" label:"身份标签"`
  29. SeoLogo string `json:"seo_logo" label:"seo"`
  30. SeoTitle string `json:"seo_title" label:"seo"`
  31. }
  32. type RoleBindPermissionGroupReq struct {
  33. RoleId int `json:"role_id" binding:"required" label:"id"`
  34. PermissionIds []int `json:"permission_ids" label:"权限组id"`
  35. }
  36. type PermissionGroupListResp struct {
  37. Id int `json:"id"`
  38. Name string `json:"name"` //菜单名称
  39. Key string `json:"key"` //唯一标识符
  40. State int `json:"state"`
  41. ParentId int `json:"parent_id"` //父级id,为0则代表没有父级
  42. CreateAt string `json:"create_at"`
  43. UpdateAt string `json:"update_at"`
  44. IsCheck bool `json:"is_check"` //是否用用
  45. SubPermissionGroupList []PermissionGroupListResp `json:"sub_permission_group_list"` //子集菜单
  46. }
  47. type AdminListReq struct {
  48. Limit int `json:"limit"`
  49. Page int `json:"page" `
  50. UserName string `json:"username"`
  51. State int `json:"state"`
  52. }
  53. type AdminListResp struct {
  54. AdmId int `json:"adm_id"`
  55. Username string `json:"username"`
  56. State int `json:"state"`
  57. IsSuperAdministrator int `json:"is_super_administrator"`
  58. Memo string `json:"memo"`
  59. CreateAt string `json:"create_at"`
  60. UpdateAt string `json:"update_at"`
  61. RoleList []string `json:"role_list"`
  62. }
  63. type UpdateAdminStateReq struct {
  64. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  65. State int `json:"state" binding:"required" label:"状态"`
  66. }
  67. type AddAdminReq struct {
  68. Username string `json:"username" binding:"required" label:"名称"`
  69. Password string `json:"password" binding:"required" label:"密码"`
  70. Memo string `json:"memo" label:"备注"`
  71. }
  72. type UpdateAdminReq struct {
  73. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  74. Username string `json:"username" binding:"required" label:"名称"`
  75. Password string `json:"password" binding:"required" label:"密码"`
  76. Memo string `json:"memo" label:"备注"`
  77. }
  78. type BindAdminRoleReq struct {
  79. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  80. RoleIds []int `json:"role_ids" label:"角色id"`
  81. }
  82. type BindAdminWithEnterpriseReq struct {
  83. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  84. Ids []int `json:"ids" label:"记录id"`
  85. }