types.go 8.4 KB

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