面包店
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.
 
 
 
 
 

93 lines
3.1 KiB

  1. package md
  2. import (
  3. "applet/app/db/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"`
  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. RoleId int `json:"role_id"`
  45. }
  46. type AdminListResp struct {
  47. AdmId int `json:"adm_id"`
  48. Username string `json:"username"`
  49. State int32 `json:"state"`
  50. IsSuperAdministrator int32 `json:"is_super_administrator"`
  51. Memo string `json:"memo"`
  52. CreateAt string `json:"create_at"`
  53. UpdateAt string `json:"update_at"`
  54. RoleList []string `json:"role_list"`
  55. }
  56. type UpdateAdminStateReq struct {
  57. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  58. State int32 `json:"state" binding:"required" label:"状态"`
  59. }
  60. type AddAdminReq struct {
  61. Username string `json:"username" binding:"required" label:"名称"`
  62. Password string `json:"password" binding:"required" label:"密码"`
  63. Memo string `json:"memo" label:"备注"`
  64. }
  65. type UpdateAdminReq struct {
  66. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  67. Username string `json:"username" binding:"required" label:"名称"`
  68. Password string `json:"password" binding:"required" label:"密码"`
  69. Memo string `json:"memo" label:"备注"`
  70. }
  71. type BindAdminRoleReq struct {
  72. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  73. RoleIds []int `json:"role_ids" label:"角色id"`
  74. }
  75. type BindAdminWithEnterpriseReq struct {
  76. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  77. Ids []int `json:"ids" label:"记录id"`
  78. }