// ========================================================================== // 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" ) // YounggeeSelectionInfoDao is the manager for logic model data accessing and custom defined data operations functions management. type YounggeeSelectionInfoDao 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 YounggeeSelectionInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // YounggeeSelectionInfoColumns defines and stores column names for table younggee_selection_info. type YounggeeSelectionInfoColumns struct { SelectionId string // 选品项目id SelectionName string // 选品项目名称 EnterpriseId string // 所属企业id ProductId string // 关联商品id ContentType string // 内容形式,1代表图文,2代表视频,3代表直播 SelectionStatus string // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案 TaskMode string // 任务形式,1、2分别表示悬赏任务、纯佣带货 Platform string // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎 SampleMode string // 领样形式,1、2、3分别表示免费领样、垫付领样、不提供样品 ProductUrl string // 带货链接 SampleNum string // 样品数量 RemainNum string // 剩余数量 CommissionRate string // 佣金比例 EstimatedCost string // 预估成本 TaskReward string // 任务悬赏 SampleCondition string // 领样条件 RewardCondition string // 返现悬赏条件 SettlementAmount string // 结算金额 TaskDdl string // 招募截止时间 Detail string // 卖点总结 ProductSnap string // 商品信息快照 ProductPhotoSnap string // 商品图片快照 CreatedAt string // 创建时间 UpdatedAt string // 修改时间 SubmitAt string // 提交审核时间 PassAt string // 审核通过时间 FailReason string // 失效原因,1、2分别表示逾期未支付、项目存在风险 PayAt string // 支付时间 FinishAt string // 结案时间 IsRead string // 是否已读 AutoTaskId string // 定时任务id AutoFailAt string // 失效自动处理时间 } // younggeeSelectionInfoColumns holds the columns for table younggee_selection_info. var younggeeSelectionInfoColumns = YounggeeSelectionInfoColumns{ SelectionId: "selection_id", SelectionName: "selection_name", EnterpriseId: "enterprise_id", ProductId: "product_id", ContentType: "content_type", SelectionStatus: "selection_status", TaskMode: "task_mode", Platform: "platform", SampleMode: "sample_mode", ProductUrl: "product_url", SampleNum: "sample_num", RemainNum: "remain_num", CommissionRate: "commission_rate", EstimatedCost: "estimated_cost", TaskReward: "task_reward", SampleCondition: "sample_condition", RewardCondition: "reward_condition", SettlementAmount: "settlement_amount", TaskDdl: "task_ddl", Detail: "detail", ProductSnap: "product_snap", ProductPhotoSnap: "product_photo_snap", CreatedAt: "created_at", UpdatedAt: "updated_at", SubmitAt: "submit_at", PassAt: "pass_at", FailReason: "fail_reason", PayAt: "pay_at", FinishAt: "finish_at", IsRead: "is_read", AutoTaskId: "auto_task_id", AutoFailAt: "auto_fail_at", } // NewYounggeeSelectionInfoDao creates and returns a new DAO object for table data access. func NewYounggeeSelectionInfoDao() *YounggeeSelectionInfoDao { return &YounggeeSelectionInfoDao{ Group: "default", Table: "younggee_selection_info", Columns: younggeeSelectionInfoColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *YounggeeSelectionInfoDao) 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 *YounggeeSelectionInfoDao) 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 *YounggeeSelectionInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }