// ========================================================================== // 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" ) // YoungeeTalentInfoDao is the manager for logic model data accessing and custom defined data operations functions management. type YoungeeTalentInfoDao 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 YoungeeTalentInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // YoungeeTalentInfoColumns defines and stores column names for table youngee_talent_info. type YoungeeTalentInfoColumns struct { Id string // 达人id TalentWxOpenid string // 达人的微信openid Avatar string // TalentWxNickname string // 达人的微信昵称 Income string // 收益总数 Withdrawing string // 提现中金额 Canwithdraw string // 可提现金额 Withdrawed string // 已提现金额 Point string // 可用积分 TalentPhoneNumber string // 电话号码 TalentAgeBracket string // 年龄段,取tallent_age_bracket表id TalentNationality string // 国籍,取tallent_nationality表id VisitStoreRegion string // 探店区域,取region_info表中的self_code IsBindInfo string // 是否填写个人资料 IsBindAccount string // 是否绑定账号,1是0否 IsBindLocation string // 是否绑定收货地址 IsBindBank string // 是否绑定银行账户信息 InBlacklist string // 是否加入黑名单 0否 1是 TaskAll string // 任务总数 TaskApply string // 报名任务数量 TaskExecute string // 执行中任务数量 TaskEnd string // 结束任务数量 CreateDate string // 创建时间 LastLoginDate string // 最后登录时间 ApplyNum string // 剩余申请次数(每天更新) UserType string // 用户类型,1、2分别表示新用户、老用户 } // youngeeTalentInfoColumns holds the columns for table youngee_talent_info. var youngeeTalentInfoColumns = YoungeeTalentInfoColumns{ Id: "id", TalentWxOpenid: "talent_wx_openid", Avatar: "avatar", TalentWxNickname: "talent_wx_nickname", Income: "income", Withdrawing: "withdrawing", Canwithdraw: "canwithdraw", Withdrawed: "withdrawed", Point: "point", TalentPhoneNumber: "talent_phone_number", TalentAgeBracket: "talent_age_bracket", TalentNationality: "talent_nationality", VisitStoreRegion: "visit_store_region", IsBindInfo: "is_bind_info", IsBindAccount: "is_bind_account", IsBindLocation: "is_bind_location", IsBindBank: "is_bind_bank", InBlacklist: "in_blacklist", TaskAll: "task_all", TaskApply: "task_apply", TaskExecute: "task_execute", TaskEnd: "task_end", CreateDate: "create_date", LastLoginDate: "last_login_date", ApplyNum: "apply_num", UserType: "user_type", } // NewYoungeeTalentInfoDao creates and returns a new DAO object for table data access. func NewYoungeeTalentInfoDao() *YoungeeTalentInfoDao { return &YoungeeTalentInfoDao{ Group: "default", Table: "youngee_talent_info", Columns: youngeeTalentInfoColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *YoungeeTalentInfoDao) 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 *YoungeeTalentInfoDao) 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 *YoungeeTalentInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }