younggee_sec_task_info.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. }
  49. // younggeeSecTaskInfoColumns holds the columns for table younggee_sec_task_info.
  50. var younggeeSecTaskInfoColumns = YounggeeSecTaskInfoColumns{
  51. Id: "id",
  52. TaskId: "task_id",
  53. SelectionId: "selection_id",
  54. TalentId: "talent_id",
  55. AccountId: "account_id",
  56. TalentPlatformInfoSnap: "talent_platform_info_snap",
  57. TalentPersonalInfoSnap: "talent_personal_info_snap",
  58. TalentPostAddrSnap: "talent_post_addr_snap",
  59. TaskReward: "task_reward",
  60. TalentPayment: "talent_payment",
  61. IsPayPayment: "is_pay_payment",
  62. IsPayReward: "is_pay_reward",
  63. TaskMode: "task_mode",
  64. SampleMode: "sample_mode",
  65. TaskStatus: "task_status",
  66. TaskStage: "task_stage",
  67. CreateDate: "create_date",
  68. SelectDate: "select_date",
  69. DeliveryDate: "delivery_date",
  70. CompleteDate: "complete_date",
  71. WithdrawDate: "withdraw_date",
  72. CompleteStatus: "complete_status",
  73. LogisticsStatus: "logistics_status",
  74. AssignmentStatus: "assignment_status",
  75. UpdateAt: "update_at",
  76. WithdrawStatus: "withdraw_status",
  77. LeadTeamId: "lead_team_id",
  78. TeamId: "team_id",
  79. TeamIncome: "team_income",
  80. TeamPoint: "team_point",
  81. }
  82. // NewYounggeeSecTaskInfoDao creates and returns a new DAO object for table data access.
  83. func NewYounggeeSecTaskInfoDao() *YounggeeSecTaskInfoDao {
  84. return &YounggeeSecTaskInfoDao{
  85. Group: "default",
  86. Table: "younggee_sec_task_info",
  87. Columns: younggeeSecTaskInfoColumns,
  88. }
  89. }
  90. // DB retrieves and returns the underlying raw database management object of current DAO.
  91. func (dao *YounggeeSecTaskInfoDao) DB() gdb.DB {
  92. return g.DB(dao.Group)
  93. }
  94. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  95. func (dao *YounggeeSecTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
  96. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  97. }
  98. // Transaction wraps the transaction logic using function f.
  99. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  100. // It commits the transaction and returns nil if function f returns nil.
  101. //
  102. // Note that, you should not Commit or Rollback the transaction in function f
  103. // as it is automatically handled by this function.
  104. func (dao *YounggeeSecTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  105. return dao.Ctx(ctx).Transaction(ctx, f)
  106. }