You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
3.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package model
  2. type WorkflowProcess struct {
  3. ID string `json:"id" gorm:"comment:流程标识;primaryKey"`
  4. Name string `json:"name" gorm:"comment:流程名称"`
  5. Category string `json:"category" gorm:"comment:分类"`
  6. Clazz string `json:"clazz" gorm:"comment:类型"`
  7. Label string `json:"label" gorm:"comment:流程标题"`
  8. HideIcon bool `json:"hideIcon" gorm:"comment:是否隐藏图标"`
  9. Description bool `json:"description" gorm:"comment:详细介绍"`
  10. Nodes []WorkflowNode `json:"nodes"` // 流程节点数据
  11. Edges []WorkflowEdge `json:"edges"` // 流程链接数据
  12. }
  13. type WorkflowNode struct {
  14. ID string `json:"id" gorm:"comment:节点id;primaryKey"`
  15. WorkflowProcessID string `json:"-" gorm:"comment:流程标识"`
  16. Clazz string `json:"clazz" gorm:"comment:节点类型"`
  17. Label string `json:"label" gorm:"comment:节点名称"`
  18. Type string `json:"type" gorm:"comment:图标类型"`
  19. Shape string `json:"shape" gorm:"comment:形状"`
  20. Description bool `json:"description" gorm:"comment:详细介绍"`
  21. X float64 `json:"y" gorm:"comment:x位置"`
  22. Y float64 `json:"x" gorm:"comment:y位置"`
  23. WaitState string `json:"waitState" gorm:"comment:等待属性"`
  24. StateValue string `json:"stateValue" gorm:"comment:等待值"`
  25. To string `json:"to" gorm:"comment:收件人"`
  26. Subject string `json:"subject" gorm:"comment:标题"`
  27. Content string `json:"content" gorm:"comment:内容"`
  28. Cycle string `json:"cycle" gorm:"comment:循环时间"`
  29. Duration string `json:"duration" gorm:"comment:持续时间"`
  30. HideIcon bool `json:"hideIcon" gorm:"comment:是否隐藏图标"`
  31. }
  32. type WorkflowEdge struct {
  33. ID string `json:"id" gorm:"comment:唯一标识;primaryKey"`
  34. WorkflowProcessID string `json:"-" gorm:"comment:流程标识"`
  35. Clazz string `json:"clazz" gorm:"comment:类型(线)"`
  36. Source string `json:"source" gorm:"comment:起点节点"`
  37. Target string `json:"target" gorm:"comment:目标节点"`
  38. SourceAnchor int `json:"sourceAnchor" gorm:"comment:起点"`
  39. TargetAnchor int `json:"targetAnchor" gorm:"comment:目标点"`
  40. Shape string `json:"shape" gorm:"comment:形状"`
  41. StartPoint WorkflowPoint `json:"startPoint"` // 起点信息
  42. EndPoint WorkflowPoint `json:"endPoint"` // 终点信息
  43. Label string `json:"label" gorm:"comment:标题"`
  44. HideIcon bool `json:"hideIcon" gorm:"comment:隐藏图标"`
  45. ConditionExpression string `json:"conditionExpression" gorm:"comment:条件标识"`
  46. Seq string `json:"seq" gorm:"comment:序号"`
  47. Reverse bool `json:"reverse" gorm:"comment:是否反向"`
  48. }
  49. type WorkflowPoint struct {
  50. ID string `json:"-" gorm:"comment:唯一标识;primaryKey"`
  51. WorkflowEdgeID string `json:"-"`
  52. X float64 `json:"x"`
  53. Y float64 `json:"y"`
  54. Index int `json:"index"`
  55. }