广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

96 lines
3.4 KiB

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