智慧食堂
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

93 行
3.2 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. EnterpriseList []map[string]interface{} `json:"enterprise_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. }