youngee_task_info.go 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. TalentPlatformInfoSnap string // 达人平台信息快照
  23. TalentPersonalInfoSnap string // 达人个人信息快照
  24. TalentPostAddrSnap string // 收货地址快照
  25. StrategyId string // 报名选择的招募策略id
  26. TaskReward string // 达人报酬
  27. SettleAmount string // 达人实际所得(扣除违约扣款)
  28. AllPayment string // 企业支付
  29. RealPayment string // 企业实际支付(扣除违约扣款)
  30. ErrBreakRate string // 未上传类型违约扣款比例,百分之
  31. ScriptBreakRate string // 脚本上传超时违约扣款比例,百分之
  32. SketchBreakRate string // 初稿上传超时违约扣款比例,百分之
  33. LinkBreakRate string // 链接上传超时违约扣款比例,百分之
  34. DataBreakRate string // 数据上传超时违约扣款比例,百分之
  35. FeeForm string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
  36. ServiceCharge string // 服务费
  37. ServiceRate string // 服务费率,千分之
  38. TaskStatus string // 任务状态 1待选 2已选 3落选
  39. TaskStage string // 任务阶段,详情见info_task_stage表
  40. CreateDate string // 创建时间
  41. SelectDate string // 反选时间
  42. DeliveryDate string // 发货时间
  43. CompleteDate string // 结束时间
  44. WithdrawDate string // 提现时间
  45. CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败 4被解约
  46. LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收
  47. ScriptStatus string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  48. SketchStatus string // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  49. UpdateAt string // 更新时间
  50. LinkStatus string // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  51. DataStatus string // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  52. CurDefaultType string // 任务当前处于的违约类型 0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
  53. WithdrawStatus string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  54. }
  55. // youngeeTaskInfoColumns holds the columns for table youngee_task_info.
  56. var youngeeTaskInfoColumns = YoungeeTaskInfoColumns{
  57. TaskId: "task_id",
  58. ProjectId: "project_id",
  59. TalentId: "talent_id",
  60. AccountId: "account_id",
  61. TalentPlatformInfoSnap: "talent_platform_info_snap",
  62. TalentPersonalInfoSnap: "talent_personal_info_snap",
  63. TalentPostAddrSnap: "talent_post_addr_snap",
  64. StrategyId: "strategy_id",
  65. TaskReward: "task_reward",
  66. SettleAmount: "settle_amount",
  67. AllPayment: "all_payment",
  68. RealPayment: "real_payment",
  69. ErrBreakRate: "err_break_rate",
  70. ScriptBreakRate: "script_break_rate",
  71. SketchBreakRate: "sketch_break_rate",
  72. LinkBreakRate: "link_break_rate",
  73. DataBreakRate: "data_break_rate",
  74. FeeForm: "fee_form",
  75. ServiceCharge: "service_charge",
  76. ServiceRate: "service_rate",
  77. TaskStatus: "task_status",
  78. TaskStage: "task_stage",
  79. CreateDate: "create_date",
  80. SelectDate: "select_date",
  81. DeliveryDate: "delivery_date",
  82. CompleteDate: "complete_date",
  83. WithdrawDate: "withdraw_date",
  84. CompleteStatus: "complete_status",
  85. LogisticsStatus: "logistics_status",
  86. ScriptStatus: "script_status",
  87. SketchStatus: "sketch_status",
  88. UpdateAt: "update_at",
  89. LinkStatus: "link_status",
  90. DataStatus: "data_status",
  91. CurDefaultType: "cur_default_type",
  92. WithdrawStatus: "withdraw_status",
  93. }
  94. // NewYoungeeTaskInfoDao creates and returns a new DAO object for table data access.
  95. func NewYoungeeTaskInfoDao() *YoungeeTaskInfoDao {
  96. return &YoungeeTaskInfoDao{
  97. Group: "default",
  98. Table: "youngee_task_info",
  99. Columns: youngeeTaskInfoColumns,
  100. }
  101. }
  102. // DB retrieves and returns the underlying raw database management object of current DAO.
  103. func (dao *YoungeeTaskInfoDao) DB() gdb.DB {
  104. return g.DB(dao.Group)
  105. }
  106. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  107. func (dao *YoungeeTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
  108. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  109. }
  110. // Transaction wraps the transaction logic using function f.
  111. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  112. // It commits the transaction and returns nil if function f returns nil.
  113. //
  114. // Note that, you should not Commit or Rollback the transaction in function f
  115. // as it is automatically handled by this function.
  116. func (dao *YoungeeTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  117. return dao.Ctx(ctx).Transaction(ctx, f)
  118. }