// ========================================================================== // 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" ) // YoungeeTaskInfoDao is the manager for logic model data accessing and custom defined data operations functions management. type YoungeeTaskInfoDao 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 YoungeeTaskInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // YoungeeTaskInfoColumns defines and stores column names for table youngee_task_info. type YoungeeTaskInfoColumns struct { TaskId string // 任务id ProjectId string // 项目id TalentId string // 达人id AccountId string // 账号id TalentPlatformInfoSnap string // 达人平台信息快照 TalentPersonalInfoSnap string // 达人个人信息快照 TalentPostAddrSnap string // 收货地址快照 StrategyId string // 报名选择的招募策略id TaskReward string // 达人报酬 SettleAmount string // 达人实际所得(扣除违约扣款) AllPayment string // 企业支付 RealPayment string // 企业实际支付(扣除违约扣款) Penalty string // 违约扣款比例,百分之 FeeForm string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价 ServiceCharge string // 服务费 ServiceRate string // 服务费率,千分之 TaskStatus string // 任务状态 1待选 2已选 3落选 TaskStage string // 任务阶段,详情见info_task_stage表 CreateDate string // 创建时间 SelectDate string // 反选时间 DeliveryDate string // 发货时间 CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败 4被解约 CompleteDate string // 结束时间 LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收 ScriptStatus string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过 } // youngeeTaskInfoColumns holds the columns for table youngee_task_info. var youngeeTaskInfoColumns = YoungeeTaskInfoColumns{ TaskId: "task_id", ProjectId: "project_id", TalentId: "talent_id", AccountId: "account_id", TalentPlatformInfoSnap: "talent_platform_info_snap", TalentPersonalInfoSnap: "talent_personal_info_snap", TalentPostAddrSnap: "talent_post_addr_snap", StrategyId: "strategy_id", TaskReward: "task_reward", SettleAmount: "settle_amount", AllPayment: "all_payment", RealPayment: "real_payment", Penalty: "penalty", FeeForm: "fee_form", ServiceCharge: "service_charge", ServiceRate: "service_rate", TaskStatus: "task_status", TaskStage: "task_stage", CreateDate: "create_date", SelectDate: "select_date", DeliveryDate: "delivery_date", CompleteStatus: "complete_status", CompleteDate: "complete_date", LogisticsStatus: "logistics_status", ScriptStatus: "script_status", } // NewYoungeeTaskInfoDao creates and returns a new DAO object for table data access. func NewYoungeeTaskInfoDao() *YoungeeTaskInfoDao { return &YoungeeTaskInfoDao{ Group: "default", Table: "youngee_task_info", Columns: youngeeTaskInfoColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *YoungeeTaskInfoDao) 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 *YoungeeTaskInfoDao) 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 *YoungeeTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }