entity.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. package workflow
  2. // Schema 审批流表单信息
  3. type Schema struct {
  4. // 表单类型。
  5. AppType *int32 `json:"appType,omitempty" xml:"appType,omitempty"`
  6. // 表单应用 uuid 或者 corpId。
  7. AppUuid *string `json:"appUuid,omitempty" xml:"appUuid,omitempty"`
  8. // 代表表单业务含义的类型。
  9. BizType *string `json:"bizType,omitempty" xml:"bizType,omitempty"`
  10. // 创建人 userId。
  11. CreatorUserId *string `json:"creatorUserId,omitempty" xml:"creatorUserId,omitempty"`
  12. // 业务自定义设置数据。
  13. CustomSetting *string `json:"customSetting,omitempty" xml:"customSetting,omitempty"`
  14. // 引擎类型,表单:0,页面:1
  15. EngineType *int32 `json:"engineType,omitempty" xml:"engineType,omitempty"`
  16. // 表单的唯一码。
  17. FormCode *string `json:"formCode,omitempty" xml:"formCode,omitempty"`
  18. // 表单 uuid。
  19. FormUuid *string `json:"formUuid,omitempty" xml:"formUuid,omitempty"`
  20. // 创建时间的时间戳。
  21. GmtCreate *string `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"`
  22. // 修改时间的时间戳。
  23. GmtModified *string `json:"gmtModified,omitempty" xml:"gmtModified,omitempty"`
  24. // 图标。
  25. Icon *string `json:"icon,omitempty" xml:"icon,omitempty"`
  26. // 排序 id。
  27. ListOrder *int32 `json:"listOrder,omitempty" xml:"listOrder,omitempty"`
  28. // 说明文案。
  29. Memo *string `json:"memo,omitempty" xml:"memo,omitempty"`
  30. // 表单名称。
  31. Name *string `json:"name,omitempty" xml:"name,omitempty"`
  32. // 数据归属者的 id 类型。企业(orgId), 群(cid), 人(uid)。
  33. OwnerIdType *string `json:"ownerIdType,omitempty" xml:"ownerIdType,omitempty"`
  34. // 目标类型: inner, outer, customer。
  35. ProcType *string `json:"procType,omitempty" xml:"procType,omitempty"`
  36. // 表单 schema 详情。
  37. SchemaContent *SchemaContent `json:"schemaContent,omitempty" xml:"schemaContent,omitempty" type:"Struct"`
  38. // 状态, PUBLISHED(启用), INVALID(停用), SAVED(草稿)
  39. Status *string `json:"status,omitempty" xml:"status,omitempty"`
  40. // 可见范围类型。
  41. VisibleRange *string `json:"visibleRange,omitempty" xml:"visibleRange,omitempty"`
  42. }
  43. type SchemaContent struct {
  44. // 图标
  45. Icon *string `json:"icon,omitempty" xml:"icon,omitempty"`
  46. // 控件列表
  47. Items []*SchemaContentItems `json:"items,omitempty" xml:"items,omitempty" type:"Repeated"`
  48. // 表单名称。
  49. Title *string `json:"title,omitempty" xml:"title,omitempty"`
  50. }
  51. type SchemaContentItems struct {
  52. // 子控件列表
  53. Children []*SchemaContentItemsChildren `json:"children,omitempty" xml:"children,omitempty" type:"Repeated"`
  54. // 控件类型,取值:
  55. ComponentName *string `json:"componentName,omitempty" xml:"componentName,omitempty"`
  56. // 控件属性。
  57. Props *SchemaContentItemsProps `json:"props,omitempty" xml:"props,omitempty" type:"Struct"`
  58. }
  59. type SchemaContentItemsChildren struct {
  60. // 控件类型
  61. ComponentName *string `json:"componentName,omitempty" xml:"componentName,omitempty"`
  62. // 子控件属性
  63. Props *SchemaContentItemsProps `json:"props,omitempty" xml:"props,omitempty" type:"Struct"`
  64. }
  65. type SchemaContentItemsProps struct {
  66. // 加班套件4.0新增 加班明细名称。
  67. ActionName *string `json:"actionName,omitempty" xml:"actionName,omitempty"`
  68. // textnote的样式,top|middle|bottom。
  69. Align *string `json:"align,omitempty" xml:"align,omitempty"`
  70. // ISV 微应用 appId,用于ISV身份权限识别,ISV可获得相应数据。
  71. AppId *int64 `json:"appId,omitempty" xml:"appId,omitempty"`
  72. // 套件是否开启异步获取分条件规则,true:开启;false:不开启。
  73. AsyncCondition *bool `json:"asyncCondition,omitempty" xml:"asyncCondition,omitempty"`
  74. // 请假、出差、外出、加班类型标签。
  75. AttendTypeLabel *string `json:"attendTypeLabel,omitempty" xml:"attendTypeLabel,omitempty"`
  76. // 表单关联控件列表。
  77. BehaviorLinkage []*SchemaContentItemsPropsBehaviorLinkage `json:"behaviorLinkage,omitempty" xml:"behaviorLinkage,omitempty" type:"Repeated"`
  78. // 控件业务自定义别名。
  79. BizAlias *string `json:"bizAlias,omitempty" xml:"bizAlias,omitempty"`
  80. // 业务套件类型。
  81. BizType *string `json:"bizType,omitempty" xml:"bizType,omitempty"`
  82. // 套件内子组件可见性
  83. ChildFieldVisible map[string]*bool `json:"childFieldVisible,omitempty" xml:"childFieldVisible,omitempty"`
  84. // 内部联系人choice,1表示多选,0表示单选。
  85. Choice *int32 `json:"choice,omitempty" xml:"choice,omitempty"`
  86. // common field的commonBizType。
  87. CommonBizType *string `json:"commonBizType,omitempty" xml:"commonBizType,omitempty"`
  88. // 是否可编辑。
  89. Disabled *bool `json:"disabled,omitempty" xml:"disabled,omitempty"`
  90. // 是否自动计算时长。
  91. Duration *bool `json:"duration,omitempty" xml:"duration,omitempty"`
  92. // 兼容字段。
  93. DurationLabel *string `json:"durationLabel,omitempty" xml:"durationLabel,omitempty"`
  94. // e签宝专用标识。
  95. ESign *bool `json:"eSign,omitempty" xml:"eSign,omitempty"`
  96. // 套件值是否打平
  97. Extract *bool `json:"extract,omitempty" xml:"extract,omitempty"`
  98. // 关联表单中的fields存储
  99. FieldsInfo *string `json:"fieldsInfo,omitempty" xml:"fieldsInfo,omitempty"`
  100. // 时间格式(DDDateField和DDDateRangeField)。
  101. Format *string `json:"format,omitempty" xml:"format,omitempty"`
  102. // 公式。
  103. Formula *string `json:"formula,omitempty" xml:"formula,omitempty"`
  104. // 加班套件4.0新增 加班明细是否隐藏。
  105. Hidden *bool `json:"hidden,omitempty" xml:"hidden,omitempty"`
  106. // textnote在详情页是否隐藏,true隐藏, false不隐藏
  107. HiddenInApprovalDetail *bool `json:"hiddenInApprovalDetail,omitempty" xml:"hiddenInApprovalDetail,omitempty"`
  108. // 加班套件4.0新增 加班明细是否隐藏标签。
  109. HideLabel *bool `json:"hideLabel,omitempty" xml:"hideLabel,omitempty"`
  110. // 兼容出勤套件类型。
  111. HolidayOptions []map[string]*string `json:"holidayOptions,omitempty" xml:"holidayOptions,omitempty" type:"Repeated"`
  112. // 控件 id。
  113. Id *string `json:"id,omitempty" xml:"id,omitempty"`
  114. // 控件名称。
  115. Label *string `json:"label,omitempty" xml:"label,omitempty"`
  116. // label是否可修改 true:不可修改。
  117. LabelEditableFreeze *bool `json:"labelEditableFreeze,omitempty" xml:"labelEditableFreeze,omitempty"`
  118. // 说明文案的链接地址。
  119. Link *string `json:"link,omitempty" xml:"link,omitempty"`
  120. // 加班套件4.0新增 加班明细描述。
  121. MainTitle *string `json:"mainTitle,omitempty" xml:"mainTitle,omitempty"`
  122. // 是否参与打印(1表示不打印, 0表示打印)。
  123. NotPrint *string `json:"notPrint,omitempty" xml:"notPrint,omitempty"`
  124. // 是否需要大写 默认是需要; 1:不需要大写, 空或者0:需要大写。
  125. NotUpper *string `json:"notUpper,omitempty" xml:"notUpper,omitempty"`
  126. // 选项内容列表,提供给业务方更多的选择器操作。
  127. ObjOptions []*SchemaContentItemsPropsObjOptions `json:"objOptions,omitempty" xml:"objOptions,omitempty" type:"Repeated"`
  128. // 单选框选项列表。
  129. Options []*string `json:"options,omitempty" xml:"options,omitempty" type:"Repeated"`
  130. // 是否有支付属性。
  131. PayEnable *bool `json:"payEnable,omitempty" xml:"payEnable,omitempty"`
  132. // 占位符。
  133. Placeholder *string `json:"placeholder,omitempty" xml:"placeholder,omitempty"`
  134. // 同步到考勤, 表示是否设置为员工状态。
  135. Push *SchemaContentItemsPropsPush `json:"push,omitempty" xml:"push,omitempty" type:"Struct"`
  136. // 推送到考勤, 子类型(DDSelectField)。
  137. PushToAttendance *bool `json:"pushToAttendance,omitempty" xml:"pushToAttendance,omitempty"`
  138. // 是否推送管理日历(DDDateRangeField, 1表示推送, 0表示不推送, 该属性为兼容保留)。
  139. PushToCalendar *int32 `json:"pushToCalendar,omitempty" xml:"pushToCalendar,omitempty"`
  140. // 是否必填。
  141. Required *bool `json:"required,omitempty" xml:"required,omitempty"`
  142. // 必填是否可修改 true:不可修改。
  143. RequiredEditableFreeze *bool `json:"requiredEditableFreeze,omitempty" xml:"requiredEditableFreeze,omitempty"`
  144. // 兼容出勤套件类型。
  145. ShowAttendOptions *bool `json:"showAttendOptions,omitempty" xml:"showAttendOptions,omitempty"`
  146. // 是否开启员工状态。
  147. StaffStatusEnabled *bool `json:"staffStatusEnabled,omitempty" xml:"staffStatusEnabled,omitempty"`
  148. // 需要计算总和的明细组件
  149. StatField []*SchemaContentItemsPropsStatField `json:"statField,omitempty" xml:"statField,omitempty" type:"Repeated"`
  150. // 数字组件/日期区间组件单位属性。
  151. Unit *string `json:"unit,omitempty" xml:"unit,omitempty"`
  152. // 是否使用考勤日历。
  153. UseCalendar *bool `json:"useCalendar,omitempty" xml:"useCalendar,omitempty"`
  154. // 明细打印排版方式 false:横向 true:纵向。
  155. VerticalPrint *bool `json:"verticalPrint,omitempty" xml:"verticalPrint,omitempty"`
  156. }
  157. type SchemaContentItemsPropsBehaviorLinkage struct {
  158. // 关联控件列表。
  159. Targets []*SchemaContentItemsPropsBehaviorLinkageTargets `json:"targets,omitempty" xml:"targets,omitempty" type:"Repeated"`
  160. // 控件值。
  161. Value *string `json:"value,omitempty" xml:"value,omitempty"`
  162. }
  163. type SchemaContentItemsPropsBehaviorLinkageTargets struct {
  164. // 行为。
  165. Behavior *string `json:"behavior,omitempty" xml:"behavior,omitempty"`
  166. // 字段 id。
  167. FieldId *string `json:"fieldId,omitempty" xml:"fieldId,omitempty"`
  168. }
  169. type SchemaContentItemsPropsObjOptions struct {
  170. Value *string `json:"value,omitempty" xml:"value,omitempty"`
  171. }
  172. type SchemaContentItemsPropsPush struct {
  173. // 考勤类型(1表示请假, 2表示出差, 3表示加班, 4表示外出)
  174. AttendanceRule *int32 `json:"attendanceRule,omitempty" xml:"attendanceRule,omitempty"`
  175. // 开启状态(1表示开启, 0表示关闭)
  176. PushSwitch *int32 `json:"pushSwitch,omitempty" xml:"pushSwitch,omitempty"`
  177. // 状态显示名称
  178. PushTag *string `json:"pushTag,omitempty" xml:"pushTag,omitempty"`
  179. }
  180. type SchemaContentItemsPropsStatField struct {
  181. // id 值。
  182. Id *string `json:"id,omitempty" xml:"id,omitempty"`
  183. // 名称。
  184. Label *string `json:"label,omitempty" xml:"label,omitempty"`
  185. // 单位。
  186. Unit *string `json:"unit,omitempty" xml:"unit,omitempty"`
  187. // 大写。
  188. Upper *bool `json:"upper,omitempty" xml:"upper,omitempty"`
  189. }
  190. // StartProcessInstanceRequest 启动审批流
  191. type StartProcessInstanceRequest struct {
  192. // 不使用审批流模板时,直接指定审批人列表
  193. Approvers []*StartProcessInstanceRequestApprovers `json:"approvers,omitempty" xml:"approvers,omitempty" type:"Repeated"`
  194. // 抄送人userId列表
  195. CcList []*string `json:"ccList,omitempty" xml:"ccList,omitempty" type:"Repeated"`
  196. // 抄送时间
  197. CcPosition *string `json:"ccPosition,omitempty" xml:"ccPosition,omitempty"`
  198. // 部门ID
  199. DeptId *int64 `json:"deptId,omitempty" xml:"deptId,omitempty"`
  200. // 表单数据内容,控件列表
  201. FormComponentValues []*StartProcessInstanceRequestFormComponentValues `json:"formComponentValues,omitempty" xml:"formComponentValues,omitempty" type:"Repeated"`
  202. // 企业微应用标识
  203. MicroappAgentId *int64 `json:"microappAgentId,omitempty" xml:"microappAgentId,omitempty"`
  204. // 审批发起人的userId
  205. OriginatorUserId *string `json:"originatorUserId,omitempty" xml:"originatorUserId,omitempty"`
  206. // 审批流的唯一码
  207. ProcessCode *string `json:"processCode,omitempty" xml:"processCode,omitempty"`
  208. // 使用审批流模板时,模板上的自选操作人列表
  209. TargetSelectActioners []*StartProcessInstanceRequestTargetSelectActioners `json:"targetSelectActioners,omitempty" xml:"targetSelectActioners,omitempty" type:"Repeated"`
  210. }
  211. type StartProcessInstanceRequestApprovers struct {
  212. // 审批类型
  213. ActionType *string `json:"actionType,omitempty" xml:"actionType,omitempty"`
  214. // 审批人列表
  215. UserIds []*string `json:"userIds,omitempty" xml:"userIds,omitempty" type:"Repeated"`
  216. }
  217. type StartProcessInstanceRequestTargetSelectActioners struct {
  218. // 自选节点的规则key
  219. ActionerKey *string `json:"actionerKey,omitempty" xml:"actionerKey,omitempty"`
  220. // 操作人userId列表
  221. ActionerUserIds []*string `json:"actionerUserIds,omitempty" xml:"actionerUserIds,omitempty" type:"Repeated"`
  222. }
  223. type StartProcessInstanceRequestFormComponentValues struct {
  224. // 控件别名
  225. BizAlias *string `json:"bizAlias,omitempty" xml:"bizAlias,omitempty"`
  226. // 控件类型
  227. ComponentType *string `json:"componentType,omitempty" xml:"componentType,omitempty"`
  228. Details []*StartProcessInstanceRequestFormComponentValuesDetails `json:"details,omitempty" xml:"details,omitempty" type:"Repeated"`
  229. // 控件扩展值
  230. ExtValue *string `json:"extValue,omitempty" xml:"extValue,omitempty"`
  231. // 控件id
  232. Id *string `json:"id,omitempty" xml:"id,omitempty"`
  233. // 控件名称
  234. Name *string `json:"name,omitempty" xml:"name,omitempty"`
  235. // 控件值
  236. Value *string `json:"value,omitempty" xml:"value,omitempty"`
  237. }
  238. type StartProcessInstanceRequestFormComponentValuesDetails struct {
  239. // 控件别名
  240. BizAlias *string `json:"bizAlias,omitempty" xml:"bizAlias,omitempty"`
  241. Details []*StartProcessInstanceRequestFormComponentValuesDetailsDetails `json:"details,omitempty" xml:"details,omitempty" type:"Repeated"`
  242. // 控件扩展值
  243. ExtValue *string `json:"extValue,omitempty" xml:"extValue,omitempty"`
  244. // 控件id
  245. Id *string `json:"id,omitempty" xml:"id,omitempty"`
  246. // 控件名称
  247. Name *string `json:"name,omitempty" xml:"name,omitempty"`
  248. // 控件值
  249. Value *string `json:"value,omitempty" xml:"value,omitempty"`
  250. }
  251. type StartProcessInstanceRequestFormComponentValuesDetailsDetails struct {
  252. // 控件别名
  253. BizAlias *string `json:"bizAlias,omitempty" xml:"bizAlias,omitempty"`
  254. // 控件类型
  255. ComponentType *string `json:"componentType,omitempty" xml:"componentType,omitempty"`
  256. // 控件扩展值
  257. ExtValue *string `json:"extValue,omitempty" xml:"extValue,omitempty"`
  258. // 控件id
  259. Id *string `json:"id,omitempty" xml:"id,omitempty"`
  260. // 控件名称
  261. Name *string `json:"name,omitempty" xml:"name,omitempty"`
  262. // 控件值
  263. Value *string `json:"value,omitempty" xml:"value,omitempty"`
  264. }