智慧食堂
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

md_role.go 2.8 KiB

1 yıl önce
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. State int `json:"state"`
  32. ParentId int `json:"parent_id"`
  33. CreateAt string `json:"create_at"`
  34. UpdateAt string `json:"update_at"`
  35. IsCheck bool `json:"is_check"`
  36. SubPermissionGroupList []PermissionGroupListResp `json:"sub_permission_group_list"`
  37. }
  38. type AdminListReq struct {
  39. Limit int `json:"limit"`
  40. Page int `json:"page" `
  41. UserName string `json:"username"`
  42. State int `json:"state"`
  43. }
  44. type AdminListResp struct {
  45. AdmId int `json:"adm_id"`
  46. Username string `json:"username"`
  47. State int32 `json:"state"`
  48. IsSuperAdministrator int32 `json:"is_super_administrator"`
  49. Memo string `json:"memo"`
  50. CreateAt string `json:"create_at"`
  51. UpdateAt string `json:"update_at"`
  52. RoleList []string `json:"role_list"`
  53. }
  54. type UpdateAdminStateReq struct {
  55. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  56. State int32 `json:"state" binding:"required" label:"状态"`
  57. }
  58. type AddAdminReq struct {
  59. Username string `json:"username" binding:"required" label:"名称"`
  60. Password string `json:"password" binding:"required" label:"密码"`
  61. Memo string `json:"memo" label:"备注"`
  62. }
  63. type UpdateAdminReq struct {
  64. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  65. Username string `json:"username" binding:"required" label:"名称"`
  66. Password string `json:"password" binding:"required" label:"密码"`
  67. Memo string `json:"memo" label:"备注"`
  68. }
  69. type BindAdminRoleReq struct {
  70. AdmId int `json:"adm_id" binding:"required" label:"管理员id"`
  71. RoleIds []int `json:"role_ids" label:"角色id"`
  72. }