workflow_node_container.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // ==========================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // ==========================================================================
  4. package internal
  5. import (
  6. "context"
  7. "github.com/gogf/gf/database/gdb"
  8. "github.com/gogf/gf/frame/g"
  9. )
  10. // WorkflowNodeContainerDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type WorkflowNodeContainerDao struct {
  12. Table string // Table is the underlying table name of the DAO.
  13. Group string // Group is the database configuration group name of current DAO.
  14. Columns WorkflowNodeContainerColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // WorkflowNodeContainerColumns defines and stores column names for table workflow_node_container.
  17. type WorkflowNodeContainerColumns struct {
  18. ContainerId string //
  19. NodeNameFirst string // 首次执行时的节点名,前端显示
  20. NodeNameAfterSecond string // 第二次之后执行时的节点名
  21. ProcedureStage string // 订单处理流程阶段,如:拍单阶段、初稿阶段
  22. StepInStage string // 在阶段中的步骤,如提交初稿是初稿阶段的第一步
  23. CurExecutionTimes string // 当前执行次数
  24. MaxExecutionTimes string // 最大执行次数
  25. Tip string // 此步骤在达人端的提示
  26. SucNextStep string // 成功后在此阶段的后续步骤 0不处理 255进行后续阶段 其余数值为本阶段step_in_stage值
  27. FailNextStep string // 失败的后续步骤,数值同上
  28. State string // 状态 1未开启 2进行中 3失败 4完成
  29. FailReason string // 失败原因
  30. StartDate string // 开始日期
  31. CompleteDate string // 完成日期
  32. CompleteUserName string // 完成人名
  33. LimitDays1 string // 限制天数
  34. ReduceFeeRatio1 string // 超期扣费比率
  35. LimitDays2 string // 第二次执行限制天数(修改操作限时)
  36. ReduceFeeRatio2 string // 第二次执行超期扣费率
  37. OperateRoleRestrict string // 操作角色限制 1后端 2达人
  38. SortId string // 在一个任务流程中的排序值
  39. OrderId string // 关联的订单和任务id
  40. }
  41. // workflowNodeContainerColumns holds the columns for table workflow_node_container.
  42. var workflowNodeContainerColumns = WorkflowNodeContainerColumns{
  43. ContainerId: "container_id",
  44. NodeNameFirst: "node_name_first",
  45. NodeNameAfterSecond: "node_name_after_second",
  46. ProcedureStage: "procedure_stage",
  47. StepInStage: "step_in_stage",
  48. CurExecutionTimes: "cur_execution_times",
  49. MaxExecutionTimes: "max_execution_times",
  50. Tip: "tip",
  51. SucNextStep: "suc_next_step",
  52. FailNextStep: "fail_next_step",
  53. State: "state",
  54. FailReason: "fail_reason",
  55. StartDate: "start_date",
  56. CompleteDate: "complete_date",
  57. CompleteUserName: "complete_user_name",
  58. LimitDays1: "limit_days_1",
  59. ReduceFeeRatio1: "reduce_fee_ratio_1",
  60. LimitDays2: "limit_days_2",
  61. ReduceFeeRatio2: "reduce_fee_ratio_2",
  62. OperateRoleRestrict: "operate_role_restrict",
  63. SortId: "sort_id",
  64. OrderId: "order_id",
  65. }
  66. // NewWorkflowNodeContainerDao creates and returns a new DAO object for table data access.
  67. func NewWorkflowNodeContainerDao() *WorkflowNodeContainerDao {
  68. return &WorkflowNodeContainerDao{
  69. Group: "default",
  70. Table: "workflow_node_container",
  71. Columns: workflowNodeContainerColumns,
  72. }
  73. }
  74. // DB retrieves and returns the underlying raw database management object of current DAO.
  75. func (dao *WorkflowNodeContainerDao) DB() gdb.DB {
  76. return g.DB(dao.Group)
  77. }
  78. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  79. func (dao *WorkflowNodeContainerDao) Ctx(ctx context.Context) *gdb.Model {
  80. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  81. }
  82. // Transaction wraps the transaction logic using function f.
  83. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  84. // It commits the transaction and returns nil if function f returns nil.
  85. //
  86. // Note that, you should not Commit or Rollback the transaction in function f
  87. // as it is automatically handled by this function.
  88. func (dao *WorkflowNodeContainerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  89. return dao.Ctx(ctx).Transaction(ctx, f)
  90. }