youngee_task_info.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. Penalty string // 违约扣款比例,百分之
  31. FeeForm string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
  32. ServiceCharge string // 服务费
  33. ServiceRate string // 服务费率,千分之
  34. TaskStatus string // 任务状态 1待选 2已选 3落选
  35. TaskStage string // 任务阶段,详情见info_task_stage表
  36. CreateDate string // 创建时间
  37. SelectDate string // 反选时间
  38. DeliveryDate string // 发货时间
  39. CompleteStatus string // 结束方式 1未结束 2正常结束 3反选失败 4被解约
  40. CompleteDate string // 结束时间
  41. LogisticsStatus string // 发货状态 1 待发货 2已发货 3 已签收
  42. ScriptStatus string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  43. }
  44. // youngeeTaskInfoColumns holds the columns for table youngee_task_info.
  45. var youngeeTaskInfoColumns = YoungeeTaskInfoColumns{
  46. TaskId: "task_id",
  47. ProjectId: "project_id",
  48. TalentId: "talent_id",
  49. AccountId: "account_id",
  50. TalentPlatformInfoSnap: "talent_platform_info_snap",
  51. TalentPersonalInfoSnap: "talent_personal_info_snap",
  52. TalentPostAddrSnap: "talent_post_addr_snap",
  53. StrategyId: "strategy_id",
  54. TaskReward: "task_reward",
  55. SettleAmount: "settle_amount",
  56. AllPayment: "all_payment",
  57. RealPayment: "real_payment",
  58. Penalty: "penalty",
  59. FeeForm: "fee_form",
  60. ServiceCharge: "service_charge",
  61. ServiceRate: "service_rate",
  62. TaskStatus: "task_status",
  63. TaskStage: "task_stage",
  64. CreateDate: "create_date",
  65. SelectDate: "select_date",
  66. DeliveryDate: "delivery_date",
  67. CompleteStatus: "complete_status",
  68. CompleteDate: "complete_date",
  69. LogisticsStatus: "logistics_status",
  70. ScriptStatus: "script_status",
  71. }
  72. // NewYoungeeTaskInfoDao creates and returns a new DAO object for table data access.
  73. func NewYoungeeTaskInfoDao() *YoungeeTaskInfoDao {
  74. return &YoungeeTaskInfoDao{
  75. Group: "default",
  76. Table: "youngee_task_info",
  77. Columns: youngeeTaskInfoColumns,
  78. }
  79. }
  80. // DB retrieves and returns the underlying raw database management object of current DAO.
  81. func (dao *YoungeeTaskInfoDao) DB() gdb.DB {
  82. return g.DB(dao.Group)
  83. }
  84. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  85. func (dao *YoungeeTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
  86. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  87. }
  88. // Transaction wraps the transaction logic using function f.
  89. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  90. // It commits the transaction and returns nil if function f returns nil.
  91. //
  92. // Note that, you should not Commit or Rollback the transaction in function f
  93. // as it is automatically handled by this function.
  94. func (dao *YoungeeTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  95. return dao.Ctx(ctx).Transaction(ctx, f)
  96. }