// ========================================================================== // 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" ) // TaskPerformHelpInfoDao is the manager for logic model data accessing and custom defined data operations functions management. type TaskPerformHelpInfoDao 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 TaskPerformHelpInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // TaskPerformHelpInfoColumns defines and stores column names for table task_perform_help_info. type TaskPerformHelpInfoColumns struct { TphId string // TaskBaseId string // 关联的任务基本信息id BrandKeyword string // 品牌关键词 ProductMerits string // 产品亮点 AppendTopic string // 添加话题 CaptureRequirement string // 拍摄要求 RemainDays string // 保留时长(天) OtherPerformRequire string // 其他执行要求 CaptureReference string // 拍摄参考 CustomServiceQrcode string // 客服二维码url BriefList string // brief图片urls } // taskPerformHelpInfoColumns holds the columns for table task_perform_help_info. var taskPerformHelpInfoColumns = TaskPerformHelpInfoColumns{ TphId: "tph_id", TaskBaseId: "task_base_id", BrandKeyword: "brand_keyword", ProductMerits: "product_merits", AppendTopic: "append_topic", CaptureRequirement: "capture_requirement", RemainDays: "remain_days", OtherPerformRequire: "other_perform_require", CaptureReference: "capture_reference", CustomServiceQrcode: "custom_service_qrcode", BriefList: "brief_list", } // NewTaskPerformHelpInfoDao creates and returns a new DAO object for table data access. func NewTaskPerformHelpInfoDao() *TaskPerformHelpInfoDao { return &TaskPerformHelpInfoDao{ Group: "default", Table: "task_perform_help_info", Columns: taskPerformHelpInfoColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *TaskPerformHelpInfoDao) 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 *TaskPerformHelpInfoDao) 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 *TaskPerformHelpInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }