智慧食堂
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.

87 line
2.9 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. }
  45. type AdminListResp struct {
  46. AdmId int `json:"adm_id"`
  47. Username string `json:"username"`
  48. State int32 `json:"state"`
  49. IsSuperAdministrator int32 `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 int32 `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. }