1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- // ==========================================================================
- // 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"
- )
- // InfoYoungeeStrategyDao is the manager for logic model data accessing and custom defined data operations functions management.
- type InfoYoungeeStrategyDao 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 InfoYoungeeStrategyColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // InfoYoungeeStrategyColumns defines and stores column names for table info_youngee_strategy.
- type InfoYoungeeStrategyColumns struct {
- Id string // id
- ProjectType string // 项目类型,0表示不限,1为全流程项目,2为选品项目
- StrategyId string // 定价策略编号
- Platform string // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
- TaskType string // 任务形式,实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货
- ContentType string // 内容形式 图文、视频、直播
- Reason string // 奖励原因,成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕;
- Points string // 积分奖励
- Cash string // 现金奖励
- Status string // '定价策略当前状态,0表示正常,1表示禁用',
- CreateAt string // 创建时间
- }
- // infoYoungeeStrategyColumns holds the columns for table info_youngee_strategy.
- var infoYoungeeStrategyColumns = InfoYoungeeStrategyColumns{
- Id: "id",
- ProjectType: "project_type",
- StrategyId: "strategyId",
- Platform: "platform",
- TaskType: "task_type",
- ContentType: "content_type",
- Reason: "reason",
- Points: "points",
- Cash: "cash",
- Status: "status",
- CreateAt: "create_at",
- }
- // NewInfoYoungeeStrategyDao creates and returns a new DAO object for table data access.
- func NewInfoYoungeeStrategyDao() *InfoYoungeeStrategyDao {
- return &InfoYoungeeStrategyDao{
- Group: "default",
- Table: "info_youngee_strategy",
- Columns: infoYoungeeStrategyColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *InfoYoungeeStrategyDao) 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 *InfoYoungeeStrategyDao) 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 *InfoYoungeeStrategyDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|