model.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. package managesdk
  2. type ServiceType string
  3. const (
  4. ServiceTypePerson ServiceType = "person"
  5. ServiceTypeResource ServiceType = "resource"
  6. ServiceTypeActivity ServiceType = "activity"
  7. ServiceTypePlan ServiceType = "plan"
  8. )
  9. const (
  10. DefaultPersonBaseURL = "http://10.0.0.210:30684/mbpms/api"
  11. DefaultResourceBaseURL = "http://10.0.0.210:30684/mbrms/api"
  12. DefaultActivityBaseURL = "http://10.0.0.210:30604/mbact/api"
  13. DefaultPlanBaseURL = "http://10.0.0.210:30604/mbact/api"
  14. )
  15. type BaseQueryParams struct {
  16. PageNo int `form:"pageNo"`
  17. PageSize int `form:"pageSize"`
  18. }
  19. type QueryResult struct {
  20. Infos []map[string]any `json:"infos"`
  21. TotalCount int64 `json:"totalCount"`
  22. }
  23. type PersonInfo struct {
  24. ID string `json:"id"`
  25. Name string `json:"name"`
  26. UserID string `json:"userId"`
  27. ExtendPropertyValues map[string]any `json:"extendProperties"`
  28. TenantID string `json:"tenantId"`
  29. CreatedTime string `json:"createdTime"`
  30. LastUpdatedTime string `json:"lastUpdatedTime"`
  31. }
  32. type SavePersonParams struct {
  33. ID string `json:"id"`
  34. Name string `json:"name"`
  35. UserID string `json:"userId"`
  36. UserName string `json:"operatorUserName"`
  37. ExtendProperties map[string]any `json:"extendProperties"`
  38. TenantID string `json:"tenantId"`
  39. OperatorUserName string `json:"operatorUserName"`
  40. }
  41. type DeletePersonParams struct {
  42. ID string `json:"id"`
  43. BusinessType []string `json:"businessType"`
  44. DeleteWhole bool `json:"deleteWhole"`
  45. DeleteUserID string `json:"deleteUserId"`
  46. DeleteUserName string `json:"deleteUserName"`
  47. OperatorUserName string `json:"operatorUserName"`
  48. }
  49. type QueryPersonsParams struct {
  50. Name string `form:"name"`
  51. UserID string `form:"userId"`
  52. ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
  53. TenantID string `form:"tenantId"`
  54. AdvancedQuery *AdvancedQueryParams `form:"advancedQuery"`
  55. BaseQueryParams
  56. }
  57. type GetPersonParams struct {
  58. ID string `form:"id"`
  59. }
  60. type GenderInfo struct {
  61. Gender string `json:"gender"`
  62. Label string `json:"label"`
  63. }
  64. type PersonStateInfo struct {
  65. State string `json:"state"`
  66. Label string `json:"label"`
  67. }
  68. type ResourceInfo struct {
  69. ID string `json:"id"`
  70. Name string `json:"name"`
  71. Code string `json:"code"`
  72. BusinessType string `json:"businessType"`
  73. ExtendPropertyValues map[string]any `json:"extendProperties"`
  74. TenantID string `json:"tenantId"`
  75. CreateUserID string `json:"createUserId"`
  76. LastUpdateUserID string `json:"lastUpdateUserId"`
  77. CreatedTime string `json:"createdTime"`
  78. LastUpdatedTime string `json:"lastUpdatedTime"`
  79. }
  80. type SaveResourceParams struct {
  81. ID string `json:"id"`
  82. Name string `json:"name"`
  83. Code string `json:"code"`
  84. BusinessType string `json:"businessType"`
  85. ExtendProperties map[string]any `json:"extendProperties"`
  86. TenantID string `json:"tenantId"`
  87. CreateUserID string `json:"createUserId"`
  88. UpdateUserID string `json:"updateUserId"`
  89. OperatorUserName string `json:"operatorUserName"`
  90. }
  91. type DeleteResourceParams struct {
  92. ID string `form:"id"`
  93. DeleteUserID string `form:"deleteUserId"`
  94. OperatorUserName string `form:"operatorUserName"`
  95. }
  96. type QueryResourcesParams struct {
  97. Name string `form:"name"`
  98. BusinessType string `form:"businessType"`
  99. ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
  100. UserID string `form:"userId"`
  101. QueryMode string `form:"queryMode"`
  102. CreateUserID string `form:"createUserId"`
  103. TenantID string `form:"tenantId"`
  104. AdvancedQuery *AdvancedQueryParams `form:"advancedQuery"`
  105. BaseQueryParams
  106. }
  107. type GetResourceParams struct {
  108. ID string `form:"id"`
  109. }
  110. type CategoryInfo struct {
  111. Category string `json:"category"`
  112. ExcludeField []string `json:"excludeField"`
  113. }
  114. type ResourceStateInfo struct {
  115. State string `json:"state"`
  116. Label string `json:"label"`
  117. }
  118. type OperateLogQueryParams struct {
  119. Resource string `form:"resource"`
  120. Action string `form:"action"`
  121. OperatorName string `form:"operatorName"`
  122. StartTime string `form:"startTime"`
  123. EndTime string `form:"endTime"`
  124. TenantID string `form:"tenantId"`
  125. BaseQueryParams
  126. }
  127. type OperateLogInfo struct {
  128. ID string `json:"id"`
  129. Resource string `json:"resource"`
  130. Action string `json:"action"`
  131. OperatorName string `json:"operatorName"`
  132. Content string `json:"content"`
  133. TenantID string `json:"tenantId"`
  134. CreatedTime string `json:"createdTime"`
  135. }
  136. type ActivityInfo struct {
  137. ID string `json:"id"`
  138. Name string `json:"name"`
  139. Description string `json:"description"`
  140. ActorID string `json:"actorId"`
  141. BusinessType []string `json:"businessType"`
  142. ExtendPropertyValues map[string]any `json:"extendProperties"`
  143. TenantID string `json:"tenantId"`
  144. CreateUserID string `json:"createUserId"`
  145. LastUpdateUserID string `json:"lastUpdateUserId"`
  146. CreatedTime string `json:"createdTime"`
  147. LastUpdatedTime string `json:"lastUpdatedTime"`
  148. }
  149. type SaveActivityParams struct {
  150. ID string `json:"id,omitempty"`
  151. Name string `json:"name"`
  152. Description string `json:"description,omitempty"`
  153. ActorID string `json:"actorId"`
  154. BusinessType []string `json:"businessType"`
  155. ExtendProperties map[string]any `json:"extendProperties,omitempty"`
  156. TenantID string `json:"tenantId"`
  157. CreateUserID string `json:"createUserId,omitempty"`
  158. UpdateUserID string `json:"updateUserId"`
  159. OperatorUserName string `json:"operatorUserName"`
  160. }
  161. type QueryActivitiesParams struct {
  162. Name string `json:"name,omitempty"`
  163. ActorID string `json:"actorId,omitempty"`
  164. BusinessType []string `json:"businessType,omitempty"`
  165. ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
  166. AdvancedQuery *AdvancedQueryParams `json:"advancedQuery,omitempty"`
  167. CreateUserID string `json:"createUserId,omitempty"`
  168. TenantID string `json:"tenantId"`
  169. PageNo int `json:"pageNo"`
  170. PageSize int `json:"pageSize"`
  171. }
  172. type DeleteActivityParams struct {
  173. ID string `json:"id"`
  174. BusinessType []string `json:"businessType"`
  175. DeleteWhole bool `json:"deleteWhole"`
  176. DeleteUserID string `json:"deleteUserId"`
  177. OperatorUserName string `json:"operatorUserName"`
  178. }
  179. type GetActivityParams struct {
  180. ID string `json:"id"`
  181. }
  182. type PlanInfo struct {
  183. ID string `json:"id"`
  184. PlanType string `json:"planType"`
  185. Name string `json:"name"`
  186. Description string `json:"description"`
  187. ActorID string `json:"actorId"`
  188. State string `json:"state"`
  189. BusinessType []string `json:"businessType"`
  190. TaskIDs []string `json:"taskIds"`
  191. Attachments []string `json:"attachments"`
  192. ExtendPropertyValues map[string]any `json:"extendProperties"`
  193. StartTime string `json:"startTime"`
  194. EndTime string `json:"endTime"`
  195. CloseTime string `json:"closeTime"`
  196. RemindAdvanceDays int `json:"remindAdvanceDays"`
  197. RemindTimes []string `json:"remindTimes"`
  198. PeriodType string `json:"periodType"`
  199. TenantID string `json:"tenantId"`
  200. CreateUserID string `json:"createUserId"`
  201. LastUpdateUserID string `json:"lastUpdateUserId"`
  202. CreatedTime string `json:"createdTime"`
  203. LastUpdatedTime string `json:"lastUpdatedTime"`
  204. }
  205. type SavePlanParams struct {
  206. ID string `json:"id,omitempty"`
  207. PlanType string `json:"planType"`
  208. Name string `json:"name"`
  209. Description string `json:"description,omitempty"`
  210. ActorID string `json:"actorId"`
  211. State string `json:"state,omitempty"`
  212. BusinessType []string `json:"businessType"`
  213. TaskIDs []string `json:"taskIds,omitempty"`
  214. Attachments []string `json:"attachments,omitempty"`
  215. ExtendProperties map[string]any `json:"extendProperties,omitempty"`
  216. StartTime string `json:"startTime,omitempty"`
  217. EndTime string `json:"endTime,omitempty"`
  218. CloseTime string `json:"closeTime,omitempty"`
  219. RemindAdvanceDays int `json:"remindAdvanceDays,omitempty"`
  220. RemindTimes []string `json:"remindTimes,omitempty"`
  221. PeriodType string `json:"periodType,omitempty"`
  222. TenantID string `json:"tenantId"`
  223. CreateUserID string `json:"createUserId,omitempty"`
  224. UpdateUserID string `json:"updateUserId"`
  225. OperatorUserName string `json:"operatorUserName"`
  226. }
  227. type QueryPlansParams struct {
  228. PlanType string `json:"planType,omitempty"`
  229. Name string `json:"name,omitempty"`
  230. ActorID string `json:"actorId,omitempty"`
  231. State string `json:"state,omitempty"`
  232. BusinessType []string `json:"businessType,omitempty"`
  233. ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
  234. AdvancedQuery *AdvancedQueryParams `json:"advancedQuery,omitempty"`
  235. CreateUserID string `json:"createUserId,omitempty"`
  236. TenantID string `json:"tenantId"`
  237. PageNo int `json:"pageNo"`
  238. PageSize int `json:"pageSize"`
  239. }
  240. type DeletePlanParams struct {
  241. ID string `json:"id"`
  242. BusinessType []string `json:"businessType"`
  243. DeleteWhole bool `json:"deleteWhole"`
  244. DeleteUserID string `json:"deleteUserId"`
  245. OperatorUserName string `json:"operatorUserName"`
  246. }
  247. type GetPlanParams struct {
  248. ID string `json:"id"`
  249. }