12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- // ==========================================================================
- // 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"
- )
- // YounggeeTeamRewardConfigDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YounggeeTeamRewardConfigDao 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 YounggeeTeamRewardConfigColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YounggeeTeamRewardConfigColumns defines and stores column names for table younggee_team_reward_config.
- type YounggeeTeamRewardConfigColumns struct {
- Id string // 自增id
- ProjectType string // 项目类型,1、2分别为全流程项目、选品项目
- Platform string // 社媒平台
- TaskForm string // 任务形式,1-5为实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货;
- ContentForm string // 内容形式,1-3为图文、视频、直播
- RewardReason string // 奖励原因,1-4为成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕
- Point string // 积分奖励
- Money string // 现金奖励,结算额百分比
- CreateAt string // 创建时间
- }
- // younggeeTeamRewardConfigColumns holds the columns for table younggee_team_reward_config.
- var younggeeTeamRewardConfigColumns = YounggeeTeamRewardConfigColumns{
- Id: "id",
- ProjectType: "project_type",
- Platform: "platform",
- TaskForm: "task_form",
- ContentForm: "content_form",
- RewardReason: "reward_reason",
- Point: "point",
- Money: "money",
- CreateAt: "create_at",
- }
- // NewYounggeeTeamRewardConfigDao creates and returns a new DAO object for table data access.
- func NewYounggeeTeamRewardConfigDao() *YounggeeTeamRewardConfigDao {
- return &YounggeeTeamRewardConfigDao{
- Group: "default",
- Table: "younggee_team_reward_config",
- Columns: younggeeTeamRewardConfigColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YounggeeTeamRewardConfigDao) 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 *YounggeeTeamRewardConfigDao) 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 *YounggeeTeamRewardConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|