// ========================================================================== // 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" ) // ProjectInfoDao is the manager for logic model data accessing and custom defined data operations functions management. type ProjectInfoDao 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 ProjectInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // ProjectInfoColumns defines and stores column names for table project_info. type ProjectInfoColumns struct { ProjectId string // 项目id ProjectName string // 项目名称 ProjectStatus string // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案 ProjectType string // 项目类型,1代表全流程项目,2代表专项项目 ProjectPlatform string // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎 ProjectForm string // 项目形式,1-4分别代表实体商品寄拍、虚拟产品测评、线下探店打卡、素材微原创 TalentType string // 达人类型 RecruitDdl string // 招募截止时间 ContentType string // 内容形式,1代表图文,2代表视频 ProjectDetail string // 项目详情 ApplyNum string // 报名人数 RecruitNum string // 已招募人数 EnterpriseId string // 所属企业id ProductId string // 关联商品id CreatedAt string // 创建时间 UpdatedAt string // 修改时间 FeeForm string // 稿费形式列表 AutoFailAt string // 失效自动处理时间 AutoTaskId string // 定时任务id AutoDefaultId string // 违约状态id PaymentAmount string // 支付金额 PayAt string // 支付时间 AutoScriptBreakAt string // 脚本违约自动处理时间 AutoSketchBreakAt string // 初稿违约自动处理时间 FailReason string // 失效原因,1、2分别表示逾期未支付、项目存在风险 PassAt string // 审核通过时间 FinishAt string // 结案时间 EstimatedCost string // 预估成本 IsRead string // 是否已读 SettlementAmount string // 结算金额 ProductSnap string // 商品信息快照 ProductPhotoSnap string // 商品图片快照 SubmitAt string // 提交审核时间 } // projectInfoColumns holds the columns for table project_info. var projectInfoColumns = ProjectInfoColumns{ ProjectId: "project_id", ProjectName: "project_name", ProjectStatus: "project_status", ProjectType: "project_type", ProjectPlatform: "project_platform", ProjectForm: "project_form", TalentType: "talent_type", RecruitDdl: "recruit_ddl", ContentType: "content_type", ProjectDetail: "project_detail", ApplyNum: "apply_num", RecruitNum: "recruit_num", EnterpriseId: "enterprise_id", ProductId: "product_id", CreatedAt: "created_at", UpdatedAt: "updated_at", FeeForm: "fee_form", AutoFailAt: "auto_fail_at", AutoTaskId: "auto_task_id", AutoDefaultId: "auto_default_id", PaymentAmount: "payment_amount", PayAt: "pay_at", AutoScriptBreakAt: "auto_script_break_at", AutoSketchBreakAt: "auto_sketch_break_at", FailReason: "fail_reason", PassAt: "pass_at", FinishAt: "finish_at", EstimatedCost: "estimated_cost", IsRead: "is_read", SettlementAmount: "settlement_amount", ProductSnap: "product_snap", ProductPhotoSnap: "product_photo_snap", SubmitAt: "submit_at", } // NewProjectInfoDao creates and returns a new DAO object for table data access. func NewProjectInfoDao() *ProjectInfoDao { return &ProjectInfoDao{ Group: "default", Table: "project_info", Columns: projectInfoColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *ProjectInfoDao) 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 *ProjectInfoDao) 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 *ProjectInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }