// ========================================================================== // 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" ) // InfoAutoDefaultHandleDao is the manager for logic model data accessing and custom defined data operations functions management. type InfoAutoDefaultHandleDao 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 InfoAutoDefaultHandleColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // InfoAutoDefaultHandleColumns defines and stores column names for table info_auto_default_handle. type InfoAutoDefaultHandleColumns struct { AutoDefaultId string // 自动处理规则id SketchReplaceNotUpload string // 初稿违约 产品置换 未上传初稿 SketchReplaceTimeOut string // 初稿违约 产品置换 超时未上传初稿 SketchOtherNotUpload string // 初稿违约 自报价、固定稿费 未上传初稿 SketchOtherTimeOut string // 初稿违约 自报价、固定稿费 超时未上传初稿 ScriptReplaceNotUpload string // 脚本违约 产品置换 未上传脚本 ScriptReplaceTimeOut string // 脚本违约 产品置换 超时未上传脚本 ScriptOtherNotUpload string // 脚本违约 自报价、固定稿费 未上传脚本 ScriptOtherTimeOut string // 脚本违约 自报价、固定稿费 超时未上传脚本 LinkReplaceNotUpload string // 链接违约 产品置换 未上传链接 LinkReplaceTimeOut string // 链接违约 产品置换 超时未上传链接 LinkOtherNotUpload string // 链接违约 自报价、固定稿费 未上传链接 LinkOtherTimeOut string // 链接违约 自报价、固定稿费 超时未上传链接 DataReplaceNotUpload string // 数据违约 产品置换 未上传数据 DataReplaceTimeOut string // 数据违约 产品置换 超时未上传数据 DataOtherNotUpload string // 数据违约 自报价、固定稿费 未上传数据 DataOtherTimeOut string // 数据违约 自报价、固定稿费 超时未上传数据 } // infoAutoDefaultHandleColumns holds the columns for table info_auto_default_handle. var infoAutoDefaultHandleColumns = InfoAutoDefaultHandleColumns{ AutoDefaultId: "auto_default_id", SketchReplaceNotUpload: "sketch_replace_not_upload", SketchReplaceTimeOut: "sketch_replace_time_out", SketchOtherNotUpload: "sketch_other_not_upload", SketchOtherTimeOut: "sketch_other_time_out", ScriptReplaceNotUpload: "script_replace_not_upload", ScriptReplaceTimeOut: "script_replace_time_out", ScriptOtherNotUpload: "script_other_not_upload", ScriptOtherTimeOut: "script_other_time_out", LinkReplaceNotUpload: "link_replace_not_upload", LinkReplaceTimeOut: "link_replace_time_out", LinkOtherNotUpload: "link_other_not_upload", LinkOtherTimeOut: "link_other_time_out", DataReplaceNotUpload: "data_replace_not_upload", DataReplaceTimeOut: "data_replace_time_out", DataOtherNotUpload: "data_other_not_upload", DataOtherTimeOut: "data_other_time_out", } // NewInfoAutoDefaultHandleDao creates and returns a new DAO object for table data access. func NewInfoAutoDefaultHandleDao() *InfoAutoDefaultHandleDao { return &InfoAutoDefaultHandleDao{ Group: "default", Table: "info_auto_default_handle", Columns: infoAutoDefaultHandleColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *InfoAutoDefaultHandleDao) 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 *InfoAutoDefaultHandleDao) 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 *InfoAutoDefaultHandleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }