wf_run_cache.go 1.2 KB

123456789101112131415161718192021222324252627282930
  1. // ============================================================================
  2. // This is auto-generated by gf cli tool only once. Fill this file as you wish.
  3. // ============================================================================
  4. package wf_run_cache
  5. import (
  6. "github.com/gogf/gf/database/gdb"
  7. "github.com/gogf/gf/errors/gerror"
  8. "github.com/gogf/gf/frame/g"
  9. )
  10. type AddData struct {
  11. RunId uint `p:"run_id" json:"run_id"` // 缓存run工作的全部流程模板步骤等信息,确保修改流程后工作依然不变
  12. FormId uint `p:"form_id" json:"form_id"` //
  13. FlowId uint `p:"flow_id" json:"flow_id"` // 流程ID
  14. RunForm string `p:"run_form" json:"run_form"` // 模板信息
  15. RunFlow string `p:"run_flow" json:"run_flow"` // 流程信息
  16. RunFlowProcess string `p:"run_flow_process" json:"run_flow_process"` // 流程步骤信息
  17. Dateline uint `p:"dateline" json:"dateline"` //
  18. }
  19. func Add(data *AddData, tx *gdb.TX) error {
  20. _, err := Model.TX(tx).Save(data)
  21. if err != nil {
  22. g.Log().Error(err)
  23. return gerror.New("保存流程日志信息失败")
  24. }
  25. return nil
  26. }