youngee_task_info.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. // ==========================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // ==========================================================================
  4. package internal
  5. import (
  6. "context"
  7. "github.com/gogf/gf/database/gdb"
  8. "github.com/gogf/gf/frame/g"
  9. )
  10. // YoungeeTaskInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YoungeeTaskInfoDao struct {
  12. Table string // Table is the underlying table name of the DAO.
  13. Group string // Group is the database configuration group name of current DAO.
  14. Columns YoungeeTaskInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YoungeeTaskInfoColumns defines and stores column names for table youngee_task_info.
  17. type YoungeeTaskInfoColumns struct {
  18. TaskId string // 任务id
  19. ProjectId string // 项目id
  20. TalentId string // 达人id
  21. AccountId string // 账号id
  22. StrategyId string // 报名选择的招募策略id
  23. TalentPlatformInfoSnap string // 达人平台信息快照
  24. TalentPersonalInfoSnap string // 达人个人信息快照
  25. TalentPostAddrSnap string // 收货地址快照
  26. TaskReward string // 达人报酬
  27. SettleAmount string // 达人实际所得(扣除违约扣款)
  28. AllPayment string // 企业支付
  29. RealPayment string // 企业实际支付(扣除违约扣款)
  30. ServiceRate string // 服务费率,千分之
  31. ServiceCharge string // 服务费
  32. FeeForm string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
  33. ErrBreakRate string // 未上传类型违约扣款比例,百分之
  34. ScriptBreakRate string // 脚本上传超时违约扣款比例,百分之
  35. SketchBreakRate string // 初稿上传超时违约扣款比例,百分之
  36. LinkBreakRate string // 链接上传超时违约扣款比例,百分之
  37. DataBreakRate string // 数据上传超时违约扣款比例,百分之
  38. TaskStage string //
  39. TaskStatus string // 任务状态 1待选 2已选 3落选
  40. LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收
  41. ScriptStatus string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  42. SketchStatus string // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  43. LinkStatus string // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  44. DataStatus string // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  45. CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败 4被解约
  46. UpdateAt string // 更新时间
  47. CreateDate string // 创建时间
  48. SelectDate string // 反选时间
  49. DeliveryDate string // 发货时间
  50. CompleteDate string // 结束时间
  51. WithdrawDate string // 提现时间
  52. CurDefaultType string // 任务当前处于的违约类型 0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
  53. WithdrawStatus string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  54. LeadTeamId string // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
  55. TeamId string // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
  56. SettleStatus string // 结算状态,1、2分别表示待结算、已结算
  57. TeamIncome string // young之团团长现金收益
  58. TeamPoint string // young之团团长积分收益
  59. CurBreakAt string // 当前阶段截止时间
  60. }
  61. // youngeeTaskInfoColumns holds the columns for table youngee_task_info.
  62. var youngeeTaskInfoColumns = YoungeeTaskInfoColumns{
  63. TaskId: "task_id",
  64. ProjectId: "project_id",
  65. TalentId: "talent_id",
  66. AccountId: "account_id",
  67. StrategyId: "strategy_id",
  68. TalentPlatformInfoSnap: "talent_platform_info_snap",
  69. TalentPersonalInfoSnap: "talent_personal_info_snap",
  70. TalentPostAddrSnap: "talent_post_addr_snap",
  71. TaskReward: "task_reward",
  72. SettleAmount: "settle_amount",
  73. AllPayment: "all_payment",
  74. RealPayment: "real_payment",
  75. ServiceRate: "service_rate",
  76. ServiceCharge: "service_charge",
  77. FeeForm: "fee_form",
  78. ErrBreakRate: "err_break_rate",
  79. ScriptBreakRate: "script_break_rate",
  80. SketchBreakRate: "sketch_break_rate",
  81. LinkBreakRate: "link_break_rate",
  82. DataBreakRate: "data_break_rate",
  83. TaskStage: "task_stage",
  84. TaskStatus: "task_status",
  85. LogisticsStatus: "logistics_status",
  86. ScriptStatus: "script_status",
  87. SketchStatus: "sketch_status",
  88. LinkStatus: "link_status",
  89. DataStatus: "data_status",
  90. CompleteStatus: "complete_status",
  91. UpdateAt: "update_at",
  92. CreateDate: "create_date",
  93. SelectDate: "select_date",
  94. DeliveryDate: "delivery_date",
  95. CompleteDate: "complete_date",
  96. WithdrawDate: "withdraw_date",
  97. CurDefaultType: "cur_default_type",
  98. WithdrawStatus: "withdraw_status",
  99. LeadTeamId: "lead_team_id",
  100. TeamId: "team_id",
  101. SettleStatus: "settle_status",
  102. TeamIncome: "team_income",
  103. TeamPoint: "team_point",
  104. CurBreakAt: "cur_break_at",
  105. }
  106. // NewYoungeeTaskInfoDao creates and returns a new DAO object for table data access.
  107. func NewYoungeeTaskInfoDao() *YoungeeTaskInfoDao {
  108. return &YoungeeTaskInfoDao{
  109. Group: "default",
  110. Table: "youngee_task_info",
  111. Columns: youngeeTaskInfoColumns,
  112. }
  113. }
  114. // DB retrieves and returns the underlying raw database management object of current DAO.
  115. func (dao *YoungeeTaskInfoDao) DB() gdb.DB {
  116. return g.DB(dao.Group)
  117. }
  118. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  119. func (dao *YoungeeTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
  120. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  121. }
  122. // Transaction wraps the transaction logic using function f.
  123. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  124. // It commits the transaction and returns nil if function f returns nil.
  125. //
  126. // Note that, you should not Commit or Rollback the transaction in function f
  127. // as it is automatically handled by this function.
  128. func (dao *YoungeeTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  129. return dao.Ctx(ctx).Transaction(ctx, f)
  130. }