广告平台(站长使用)
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.
 
 
 
 
 

103 lines
3.7 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. 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. ShowTime string `json:"show_time"`
  62. RoleList []string `json:"role_list"`
  63. }
  64. type UpdateAdminStateReq struct {
  65. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  66. State int `json:"state" binding:"required" label:"状态"`
  67. }
  68. type AddAdminReq struct {
  69. Username string `json:"username" binding:"required" label:"名称"`
  70. Password string `json:"password" binding:"required" label:"密码"`
  71. Memo string `json:"memo" label:"备注"`
  72. ShowTime string `json:"show_time"`
  73. }
  74. type UpdateAdminReq struct {
  75. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  76. Username string `json:"username" binding:"required" label:"名称"`
  77. Password string `json:"password" binding:"required" label:"密码"`
  78. Memo string `json:"memo" label:"备注"`
  79. ShowTime string `json:"show_time"`
  80. }
  81. type BindAdminRoleReq struct {
  82. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  83. RoleIds []int `json:"role_ids" label:"角色id"`
  84. }
  85. type BindAdminWithEnterpriseReq struct {
  86. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  87. Ids []int `json:"ids" label:"记录id"`
  88. }