// ========================================================================== // 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" ) // YounggeeTalentTeamDao is the manager for logic model data accessing and custom defined data operations functions management. type YounggeeTalentTeamDao 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 YounggeeTalentTeamColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // YounggeeTalentTeamColumns defines and stores column names for table younggee_talent_team. type YounggeeTalentTeamColumns struct { Id string // 递增id TeamId string // young之团id,10位随机数 TalentId string // 团长达人id,对应youngee_talent_info中id字段 ProjectId string // 项目id SelectionId string // 选品id ProjectType string // 项目类型,1为项目,2为选品 ProjectName string // 项目名称 ProjectPhoto string // 项目主图 Platform string // 项目平台 TeamStatus string // young之团状态,1表示创建中,2表示开团中,3表示已结束 NumApply string // 报名人数 NumApplySuccess string // 申请成功人数 NumEnd string // 结案人数 PointIncome string // 积分收益 MoneyIncome string // 现金收益 CreateAt string // 成团时间 EndAt string // 结束时间 } // younggeeTalentTeamColumns holds the columns for table younggee_talent_team. var younggeeTalentTeamColumns = YounggeeTalentTeamColumns{ Id: "id", TeamId: "team_id", TalentId: "talent_id", ProjectId: "project_id", SelectionId: "selection_id", ProjectType: "project_type", ProjectName: "project_name", ProjectPhoto: "project_photo", Platform: "platform", TeamStatus: "team_status", NumApply: "num_apply", NumApplySuccess: "num_apply_success", NumEnd: "num_end", PointIncome: "point_income", MoneyIncome: "money_income", CreateAt: "create_at", EndAt: "end_at", } // NewYounggeeTalentTeamDao creates and returns a new DAO object for table data access. func NewYounggeeTalentTeamDao() *YounggeeTalentTeamDao { return &YounggeeTalentTeamDao{ Group: "default", Table: "younggee_talent_team", Columns: younggeeTalentTeamColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *YounggeeTalentTeamDao) 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 *YounggeeTalentTeamDao) 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 *YounggeeTalentTeamDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }