younggee_sec_task_info.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. // YounggeeSecTaskInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YounggeeSecTaskInfoDao 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 YounggeeSecTaskInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YounggeeSecTaskInfoColumns defines and stores column names for table younggee_sec_task_info.
  17. type YounggeeSecTaskInfoColumns struct {
  18. Id string // 递增id
  19. TaskId string // 选品任务id
  20. SelectionId string // 选品id
  21. TalentId string // 达人id
  22. AccountId string // 账号id
  23. TalentPlatformInfoSnap string // 达人平台信息快照
  24. TalentPersonalInfoSnap string // 达人个人信息快照
  25. TalentPostAddrSnap string // 收货地址快照
  26. TaskReward string // 达人赏金
  27. TalentPayment string // 达人垫付金额
  28. IsPayPayment string // 企业是否返样品钱
  29. IsPayReward string // 企业是否结算悬赏
  30. TaskMode string // 任务形式,1、2分别表示纯佣带货、悬赏任务
  31. SampleMode string // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
  32. TaskStatus string // 任务状态 1待选 2已选 3落选
  33. TaskStage string // 任务阶段,详情见info_sec_task_stage表
  34. CreateDate string // 创建时间
  35. SelectDate string // 反选时间
  36. DeliveryDate string // 发货时间
  37. CompleteDate string // 结束时间
  38. WithdrawDate string // 提现时间
  39. CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败
  40. LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收
  41. AssignmentStatus string // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  42. UpdateAt string // 更新时间
  43. WithdrawStatus string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  44. LeadTeamId string // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
  45. TeamId string // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
  46. TeamIncome string // young之团团长现金收益
  47. TeamPoint string // young之团团长积分收益
  48. ProductId string //商品id
  49. }
  50. // younggeeSecTaskInfoColumns holds the columns for table younggee_sec_task_info.
  51. var younggeeSecTaskInfoColumns = YounggeeSecTaskInfoColumns{
  52. Id: "id",
  53. TaskId: "task_id",
  54. SelectionId: "selection_id",
  55. ProductId: "product_id",
  56. TalentId: "talent_id",
  57. AccountId: "account_id",
  58. TalentPlatformInfoSnap: "talent_platform_info_snap",
  59. TalentPersonalInfoSnap: "talent_personal_info_snap",
  60. TalentPostAddrSnap: "talent_post_addr_snap",
  61. TaskReward: "task_reward",
  62. TalentPayment: "talent_payment",
  63. IsPayPayment: "is_pay_payment",
  64. IsPayReward: "is_pay_reward",
  65. TaskMode: "task_mode",
  66. SampleMode: "sample_mode",
  67. TaskStatus: "task_status",
  68. TaskStage: "task_stage",
  69. CreateDate: "create_date",
  70. SelectDate: "select_date",
  71. DeliveryDate: "delivery_date",
  72. CompleteDate: "complete_date",
  73. WithdrawDate: "withdraw_date",
  74. CompleteStatus: "complete_status",
  75. LogisticsStatus: "logistics_status",
  76. AssignmentStatus: "assignment_status",
  77. UpdateAt: "update_at",
  78. WithdrawStatus: "withdraw_status",
  79. LeadTeamId: "lead_team_id",
  80. TeamId: "team_id",
  81. TeamIncome: "team_income",
  82. TeamPoint: "team_point",
  83. }
  84. // NewYounggeeSecTaskInfoDao creates and returns a new DAO object for table data access.
  85. func NewYounggeeSecTaskInfoDao() *YounggeeSecTaskInfoDao {
  86. return &YounggeeSecTaskInfoDao{
  87. Group: "default",
  88. Table: "younggee_sec_task_info",
  89. Columns: younggeeSecTaskInfoColumns,
  90. }
  91. }
  92. // DB retrieves and returns the underlying raw database management object of current DAO.
  93. func (dao *YounggeeSecTaskInfoDao) DB() gdb.DB {
  94. return g.DB(dao.Group)
  95. }
  96. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  97. func (dao *YounggeeSecTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
  98. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  99. }
  100. // Transaction wraps the transaction logic using function f.
  101. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  102. // It commits the transaction and returns nil if function f returns nil.
  103. //
  104. // Note that, you should not Commit or Rollback the transaction in function f
  105. // as it is automatically handled by this function.
  106. func (dao *YounggeeSecTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  107. return dao.Ctx(ctx).Transaction(ctx, f)
  108. }