// ========================================================================== // Code generated by GoFrame CLI tool. DO NOT EDIT. // ========================================================================== package internal import ( "context" "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/frame/g" ) // WorkflowNodeTemplateDao is the manager for logic model data accessing and custom defined data operations functions management. type WorkflowNodeTemplateDao struct { Table string // Table is the underlying table name of the DAO. Group string // Group is the database configuration group name of current DAO. Columns WorkflowNodeTemplateColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // WorkflowNodeTemplateColumns defines and stores column names for table workflow_node_template. type WorkflowNodeTemplateColumns struct { TemplateId string // NodeNameFirst string // 首次执行时的节点名,前端显示 NodeNameAfterSecond string // 第二次之后执行时的节点名 ProcedureStage string // 订单处理流程阶段,如:拍单阶段、初稿阶段 StepInStage string // 在阶段中的步骤,如提交初稿是初稿阶段的第一步 CurExecutionTimes string // 当前执行次数 MaxExecutionTimes string // 最大执行次数 Tip string // 此步骤在达人端的提示 SucNextStep string // 成功后在此阶段的后续步骤 0不处理 255进行后续阶段 其余数值为本阶段step_in_stage值 FailNextStep string // 失败的后续步骤,数值同上 State string // 状态 1未开启 2进行中 3成功 4失败 FailReason string // StartDate string // 开启日期 CompleteDate string // 完成日期 CompleteUserName string // 完成人名 LimitDays1 string // 此状态限制天数 0不限制 ReduceFeeRatio1 string // 超期扣费比率 LimitDays2 string // 第二次执行限制天数(修改操作限时) ReduceFeeRatio2 string // 第二次执行超期扣费率 OperateRoleRestrict string // 操作角色限制 1后端 2达人 SortId string // } // workflowNodeTemplateColumns holds the columns for table workflow_node_template. var workflowNodeTemplateColumns = WorkflowNodeTemplateColumns{ TemplateId: "template_id", NodeNameFirst: "node_name_first", NodeNameAfterSecond: "node_name_after_second", ProcedureStage: "procedure_stage", StepInStage: "step_in_stage", CurExecutionTimes: "cur_execution_times", MaxExecutionTimes: "max_execution_times", Tip: "tip", SucNextStep: "suc_next_step", FailNextStep: "fail_next_step", State: "state", FailReason: "fail_reason", StartDate: "start_date", CompleteDate: "complete_date", CompleteUserName: "complete_user_name", LimitDays1: "limit_days_1", ReduceFeeRatio1: "reduce_fee_ratio_1", LimitDays2: "limit_days_2", ReduceFeeRatio2: "reduce_fee_ratio_2", OperateRoleRestrict: "operate_role_restrict", SortId: "sort_id", } // NewWorkflowNodeTemplateDao creates and returns a new DAO object for table data access. func NewWorkflowNodeTemplateDao() *WorkflowNodeTemplateDao { return &WorkflowNodeTemplateDao{ Group: "default", Table: "workflow_node_template", Columns: workflowNodeTemplateColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *WorkflowNodeTemplateDao) DB() gdb.DB { return g.DB(dao.Group) } // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. func (dao *WorkflowNodeTemplateDao) Ctx(ctx context.Context) *gdb.Model { return dao.DB().Model(dao.Table).Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. // It rollbacks the transaction and returns the error from function f if it returns non-nil error. // It commits the transaction and returns nil if function f returns nil. // // Note that, you should not Commit or Rollback the transaction in function f // as it is automatically handled by this function. func (dao *WorkflowNodeTemplateDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }