types.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. // Code generated by goctl. DO NOT EDIT.
  2. // goctl 1.10.0
  3. package types
  4. type AddMemberReq struct {
  5. ProductCode string `json:"productCode"`
  6. UserId int64 `json:"userId"`
  7. MemberType string `json:"memberType"`
  8. }
  9. type AdminLoginReq struct {
  10. Username string `json:"username"`
  11. Password string `json:"password"`
  12. ManagementKey string `json:"managementKey"`
  13. }
  14. type BindPermsReq struct {
  15. RoleId int64 `json:"roleId"`
  16. PermIds []int64 `json:"permIds"`
  17. }
  18. type BindRolesReq struct {
  19. UserId int64 `json:"userId"`
  20. RoleIds []int64 `json:"roleIds"`
  21. }
  22. type ChangePasswordReq struct {
  23. OldPassword string `json:"oldPassword"`
  24. NewPassword string `json:"newPassword"`
  25. }
  26. type CreateDeptReq struct {
  27. ParentId int64 `json:"parentId"`
  28. Name string `json:"name"`
  29. Sort int64 `json:"sort,optional"`
  30. DeptType string `json:"deptType,optional"`
  31. Remark string `json:"remark,optional"`
  32. }
  33. type CreateProductReq struct {
  34. Code string `json:"code"`
  35. Name string `json:"name"`
  36. Remark string `json:"remark,optional"`
  37. AdminDeptId int64 `json:"adminDeptId"`
  38. }
  39. type CreateProductResp struct {
  40. Id int64 `json:"id"`
  41. Code string `json:"code"`
  42. AppKey string `json:"appKey"`
  43. AdminUser string `json:"adminUser"`
  44. // CredentialsTicket 一次性凭证票据。AppSecret 与初始 AdminPassword 不再随本响应明文返回,
  45. // 改为由调用方用该 ticket 调一次 /api/product/fetchInitialCredentials 领取(5 分钟内有效,
  46. // 一次性消费)。审计 M-4:避免密码/密钥经响应体落盘到上游日志/APM。
  47. CredentialsTicket string `json:"credentialsTicket"`
  48. CredentialsExpiresAt int64 `json:"credentialsExpiresAt"`
  49. }
  50. type FetchInitialCredentialsReq struct {
  51. Ticket string `json:"ticket"`
  52. }
  53. type FetchInitialCredentialsResp struct {
  54. AppKey string `json:"appKey"`
  55. AppSecret string `json:"appSecret"`
  56. AdminUser string `json:"adminUser"`
  57. AdminPassword string `json:"adminPassword"`
  58. }
  59. type CreateRoleReq struct {
  60. ProductCode string `json:"productCode"`
  61. Name string `json:"name"`
  62. Remark string `json:"remark,optional"`
  63. PermsLevel int64 `json:"permsLevel"`
  64. }
  65. type CreateUserReq struct {
  66. Username string `json:"username"`
  67. Password string `json:"password"`
  68. Nickname string `json:"nickname,optional"`
  69. Email string `json:"email,optional"`
  70. Phone string `json:"phone,optional"`
  71. Remark string `json:"remark,optional"`
  72. DeptId int64 `json:"deptId,optional"`
  73. }
  74. type DeleteDeptReq struct {
  75. Id int64 `json:"id"`
  76. }
  77. type DeleteRoleReq struct {
  78. Id int64 `json:"id"`
  79. }
  80. type DeptItem struct {
  81. Id int64 `json:"id"`
  82. ParentId int64 `json:"parentId"`
  83. Name string `json:"name"`
  84. Path string `json:"path"`
  85. Sort int64 `json:"sort"`
  86. DeptType string `json:"deptType"`
  87. Remark string `json:"remark"`
  88. Status int64 `json:"status"`
  89. CreateTime int64 `json:"createTime"`
  90. Children []*DeptItem `json:"children"`
  91. }
  92. type IdResp struct {
  93. Id int64 `json:"id"`
  94. }
  95. type LoginReq struct {
  96. Username string `json:"username"`
  97. Password string `json:"password"`
  98. ProductCode string `json:"productCode"`
  99. }
  100. type LoginResp struct {
  101. AccessToken string `json:"accessToken"`
  102. RefreshToken string `json:"refreshToken"`
  103. Expires int64 `json:"expires"`
  104. UserInfo UserInfo `json:"userInfo"`
  105. }
  106. type MemberItem struct {
  107. Id int64 `json:"id"`
  108. ProductCode string `json:"productCode"`
  109. UserId int64 `json:"userId"`
  110. Username string `json:"username"`
  111. Nickname string `json:"nickname"`
  112. MemberType string `json:"memberType"`
  113. Status int64 `json:"status"`
  114. CreateTime int64 `json:"createTime"`
  115. }
  116. type MemberListReq struct {
  117. ProductCode string `json:"productCode"`
  118. Page int64 `json:"page,optional"`
  119. PageSize int64 `json:"pageSize,optional"`
  120. }
  121. type PageResp struct {
  122. Total int64 `json:"total"`
  123. List interface{} `json:"list"`
  124. }
  125. type PermItem struct {
  126. Id int64 `json:"id"`
  127. ProductCode string `json:"productCode"`
  128. Name string `json:"name"`
  129. Code string `json:"code"`
  130. Remark string `json:"remark"`
  131. Status int64 `json:"status"`
  132. CreateTime int64 `json:"createTime"`
  133. }
  134. type PermListReq struct {
  135. ProductCode string `json:"productCode"`
  136. Page int64 `json:"page,optional"`
  137. PageSize int64 `json:"pageSize,optional"`
  138. }
  139. type ProductDetailReq struct {
  140. Id int64 `json:"id"`
  141. }
  142. type ProductItem struct {
  143. Id int64 `json:"id"`
  144. Code string `json:"code"`
  145. Name string `json:"name"`
  146. AppKey string `json:"appKey"`
  147. Remark string `json:"remark"`
  148. Status int64 `json:"status"`
  149. CreateTime int64 `json:"createTime"`
  150. }
  151. type ProductListReq struct {
  152. Page int64 `json:"page,optional"`
  153. PageSize int64 `json:"pageSize,optional"`
  154. }
  155. type RefreshTokenReq struct {
  156. Authorization string `header:"Authorization"`
  157. ProductCode string `json:"productCode,optional"`
  158. }
  159. type RemoveMemberReq struct {
  160. Id int64 `json:"id"`
  161. }
  162. type RoleDetailReq struct {
  163. Id int64 `json:"id"`
  164. }
  165. type RoleItem struct {
  166. Id int64 `json:"id"`
  167. ProductCode string `json:"productCode"`
  168. Name string `json:"name"`
  169. Remark string `json:"remark"`
  170. Status int64 `json:"status"`
  171. PermsLevel int64 `json:"permsLevel"`
  172. PermIds []int64 `json:"permIds,omitempty"`
  173. CreateTime int64 `json:"createTime"`
  174. }
  175. type RoleListReq struct {
  176. ProductCode string `json:"productCode"`
  177. Page int64 `json:"page,optional"`
  178. PageSize int64 `json:"pageSize,optional"`
  179. }
  180. type SetPermsReq struct {
  181. UserId int64 `json:"userId"`
  182. Perms []UserPermItem `json:"perms"`
  183. }
  184. type SyncPermItem struct {
  185. Code string `json:"code"`
  186. Name string `json:"name"`
  187. Remark string `json:"remark,optional"`
  188. }
  189. type SyncPermsReq struct {
  190. AppKey string `json:"appKey"`
  191. AppSecret string `json:"appSecret"`
  192. Perms []SyncPermItem `json:"perms"`
  193. }
  194. type SyncPermsResp struct {
  195. Added int64 `json:"added"`
  196. Updated int64 `json:"updated"`
  197. Disabled int64 `json:"disabled"`
  198. }
  199. type UpdateDeptReq struct {
  200. Id int64 `json:"id"`
  201. Name string `json:"name"`
  202. Sort int64 `json:"sort,optional"`
  203. DeptType string `json:"deptType,optional"`
  204. Remark string `json:"remark,optional"`
  205. Status int64 `json:"status,optional"`
  206. }
  207. type UpdateMemberReq struct {
  208. Id int64 `json:"id"`
  209. MemberType string `json:"memberType"`
  210. Status int64 `json:"status,optional"`
  211. }
  212. type UpdateProductReq struct {
  213. Id int64 `json:"id"`
  214. Name string `json:"name"`
  215. Remark string `json:"remark,optional"`
  216. Status int64 `json:"status,optional"`
  217. }
  218. type UpdateRoleReq struct {
  219. Id int64 `json:"id"`
  220. Name string `json:"name"`
  221. Remark string `json:"remark,optional"`
  222. PermsLevel int64 `json:"permsLevel"`
  223. Status int64 `json:"status,optional"`
  224. }
  225. type UpdateUserReq struct {
  226. Id int64 `json:"id"`
  227. Nickname *string `json:"nickname,optional"`
  228. Email *string `json:"email,optional"`
  229. Phone *string `json:"phone,optional"`
  230. Remark *string `json:"remark,optional"`
  231. DeptId *int64 `json:"deptId,optional"`
  232. Status int64 `json:"status,optional"`
  233. }
  234. type UpdateUserStatusReq struct {
  235. Id int64 `json:"id"`
  236. Status int64 `json:"status"`
  237. }
  238. type UserDetailReq struct {
  239. Id int64 `json:"id"`
  240. }
  241. type UserInfo struct {
  242. UserId int64 `json:"userId"`
  243. Username string `json:"username"`
  244. Nickname string `json:"nickname"`
  245. Avatar string `json:"avatar"`
  246. Email string `json:"email"`
  247. Phone string `json:"phone"`
  248. IsSuperAdmin int64 `json:"isSuperAdmin"`
  249. MustChangePassword int64 `json:"mustChangePassword"`
  250. MemberType string `json:"memberType"`
  251. Perms []string `json:"perms"`
  252. }
  253. type UserItem struct {
  254. Id int64 `json:"id"`
  255. Username string `json:"username"`
  256. Nickname string `json:"nickname"`
  257. Avatar string `json:"avatar"`
  258. Email string `json:"email"`
  259. Phone string `json:"phone"`
  260. Remark string `json:"remark"`
  261. DeptId int64 `json:"deptId"`
  262. Status int64 `json:"status"`
  263. MemberType string `json:"memberType,omitempty"`
  264. RoleIds []int64 `json:"roleIds,omitempty"`
  265. Perms []string `json:"perms,omitempty"`
  266. CreateTime int64 `json:"createTime"`
  267. }
  268. type UserListReq struct {
  269. ProductCode string `json:"productCode,optional"`
  270. Page int64 `json:"page,optional"`
  271. PageSize int64 `json:"pageSize,optional"`
  272. }
  273. type UserPermItem struct {
  274. PermId int64 `json:"permId"`
  275. Effect string `json:"effect"`
  276. }