1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- // ==========================================================================
- // 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"
- )
- // InfoAutoTaskDao is the manager for logic model data accessing and custom defined data operations functions management.
- type InfoAutoTaskDao 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 InfoAutoTaskColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // InfoAutoTaskColumns defines and stores column names for table info_auto_task.
- type InfoAutoTaskColumns struct {
- AutoTaskId string // 自动处理规则id
- SignInOffline string // 线下探店自动签收时间
- SignInVirtual string // 虚拟产品测评自动签收时间
- ReviewInMv string // 视频形式的审稿处理
- ReviewUnlimited string // 不限形式的审稿处理
- Postreview string // 发布审核自动处理
- CaseClose string // 结案自动处理
- Invalid string // 全流程项目失效自动处理
- DraftDefaultInPic string // 图片初稿违约自动处理
- DraftDefaultInMv string // 视频初稿违约自动处理
- ScriptDefault string // 脚本违约自动处理
- LinkBreach string // 链接违约自动处理
- CaseCloseDefault string // 结案违约自动处理
- Selectioninvalid string // 选品项目失效自动处理
- }
- // infoAutoTaskColumns holds the columns for table info_auto_task.
- var infoAutoTaskColumns = InfoAutoTaskColumns{
- AutoTaskId: "auto_task_id",
- SignInOffline: "sign_in_offline",
- SignInVirtual: "sign_in_virtual",
- ReviewInMv: "review_in_mv",
- ReviewUnlimited: "review_unlimited",
- Postreview: "postreview",
- CaseClose: "case_close",
- Invalid: "invalid",
- DraftDefaultInPic: "draft_default_in_pic",
- DraftDefaultInMv: "draft_default_in_mv",
- ScriptDefault: "script_default",
- LinkBreach: "link_breach",
- CaseCloseDefault: "case_close_default",
- Selectioninvalid: "selectioninvalid",
- }
- // NewInfoAutoTaskDao creates and returns a new DAO object for table data access.
- func NewInfoAutoTaskDao() *InfoAutoTaskDao {
- return &InfoAutoTaskDao{
- Group: "default",
- Table: "info_auto_task",
- Columns: infoAutoTaskColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *InfoAutoTaskDao) 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 *InfoAutoTaskDao) 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 *InfoAutoTaskDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|