model.go 10 KB

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