// ========================================================================== // 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 // 企业实际支付(扣除违约扣款) ErrBreakRate string // 未上传类型违约扣款比例,百分之 ScriptBreakRate string // 脚本上传超时违约扣款比例,百分之 SketchBreakRate string // 初稿上传超时违约扣款比例,百分之 LinkBreakRate string // 链接上传超时违约扣款比例,百分之 DataBreakRate 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 // 发货时间 CompleteDate string // 结束时间 WithdrawDate string // 提现时间 CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败 4被解约 LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收 ScriptStatus string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过 SketchStatus string // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过 UpdateAt string // 更新时间 LinkStatus string // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过 DataStatus string // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过 CurDefaultType string // 任务当前处于的违约类型 0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约 WithdrawStatus string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现 } // 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", ErrBreakRate: "err_break_rate", ScriptBreakRate: "script_break_rate", SketchBreakRate: "sketch_break_rate", LinkBreakRate: "link_break_rate", DataBreakRate: "data_break_rate", FeeForm: "fee_form", ServiceCharge: "service_charge", ServiceRate: "service_rate", TaskStatus: "task_status", TaskStage: "task_stage", CreateDate: "create_date", SelectDate: "select_date", DeliveryDate: "delivery_date", CompleteDate: "complete_date", WithdrawDate: "withdraw_date", CompleteStatus: "complete_status", LogisticsStatus: "logistics_status", ScriptStatus: "script_status", SketchStatus: "sketch_status", UpdateAt: "update_at", LinkStatus: "link_status", DataStatus: "data_status", CurDefaultType: "cur_default_type", WithdrawStatus: "withdraw_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) }