workflow.go 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package response
  2. type MsgResponse struct {
  3. Success bool `json:"success"`
  4. ErrCode int `json:"errCode"`
  5. Msg string `json:"msg"`
  6. }
  7. type InfosData[T any] struct {
  8. Infos []T `json:"infos"`
  9. TotalCount int64 `json:"totalCount"`
  10. PageNo int `json:"pageNo"`
  11. }
  12. type InfoResponse[T any] struct {
  13. MsgResponse
  14. Info T `json:"info"`
  15. }
  16. type InfosResponse[T any] struct {
  17. MsgResponse
  18. InfosData[T]
  19. }
  20. type BusinessCatalogsInfoWithWorkflowTemplate struct {
  21. ID string `json:"id"`
  22. Name string `json:"name"`
  23. Code string `json:"code"`
  24. Sort int `json:"sort"`
  25. TenantID string `json:"tenantId" `
  26. CreateUserID string `json:"createUserId"`
  27. LastUpdateUserID string `json:"lastUpdateUserId"`
  28. CreatedTime string `json:"createdTime"`
  29. LastUpdatedTime string `json:"lastUpdatedTime"`
  30. WorkTemplateId string `json:"workTemplateId"`
  31. }
  32. type PrepareInfo struct {
  33. //Flag int `json:"flag"` // 1-选择部门 2-选择审批人
  34. //WorkflowFieldLabel string `json:"workflowFieldLabel"`
  35. //ChooseData []CustomStructureInfo `json:"chooseData"`
  36. //WorkflowFieldName string `json:"workflowFieldName"`
  37. ID string `json:"id"`
  38. Label string `json:"label"`
  39. Placeholder string `json:"placeholder"`
  40. Value string `json:"value"`
  41. Name string `json:"name"`
  42. Type string `json:"type"`
  43. Rules []Rule `json:"rules"`
  44. Options []Option `json:"options"`
  45. Props Props `json:"props"`
  46. }
  47. type Option struct {
  48. Label string `json:"label"`
  49. Value string `json:"value"`
  50. }
  51. type Props struct {
  52. Multiple bool `json:"multiple"`
  53. Filterable bool `json:"filterable"`
  54. Context string `json:"context"`
  55. }
  56. type Rule struct {
  57. Required bool `json:"required"`
  58. Message string `json:"message"`
  59. Trigger []string `json:"trigger"`
  60. }
  61. type CustomStructureInfo struct {
  62. ID string `json:"id"`
  63. Name string `json:"name"`
  64. Visible int `json:"visible"`
  65. Sort int `json:"sort"`
  66. ParentID string `json:"parentId"`
  67. Paths string `json:"paths" `
  68. LeaderUserID string `json:"leaderUserId" `
  69. LeaderUserName string `json:"leaderUserName"`
  70. TenantID string `json:"tenantId"`
  71. CreateUserID string `json:"createUserId"`
  72. LastUpdateUserID string `json:"lastUpdateUserId"`
  73. CreatedTime string `json:"createdTime"`
  74. LastUpdatedTime string `json:"lastUpdatedTime"`
  75. }