task_perform_help_info.go 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. // TaskPerformHelpInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type TaskPerformHelpInfoDao 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 TaskPerformHelpInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // TaskPerformHelpInfoColumns defines and stores column names for table task_perform_help_info.
  17. type TaskPerformHelpInfoColumns struct {
  18. TphId string //
  19. TaskBaseId string // 关联的任务基本信息id
  20. BrandKeyword string // 品牌关键词
  21. ProductMerits string // 产品亮点
  22. AppendTopic string // 添加话题
  23. CaptureRequirement string // 拍摄要求
  24. RemainDays string // 保留时长(天)
  25. OtherPerformRequire string // 其他执行要求
  26. CaptureReference string // 拍摄参考
  27. CustomServiceQrcode string // 客服二维码url
  28. BriefList string // brief图片urls
  29. }
  30. // taskPerformHelpInfoColumns holds the columns for table task_perform_help_info.
  31. var taskPerformHelpInfoColumns = TaskPerformHelpInfoColumns{
  32. TphId: "tph_id",
  33. TaskBaseId: "task_base_id",
  34. BrandKeyword: "brand_keyword",
  35. ProductMerits: "product_merits",
  36. AppendTopic: "append_topic",
  37. CaptureRequirement: "capture_requirement",
  38. RemainDays: "remain_days",
  39. OtherPerformRequire: "other_perform_require",
  40. CaptureReference: "capture_reference",
  41. CustomServiceQrcode: "custom_service_qrcode",
  42. BriefList: "brief_list",
  43. }
  44. // NewTaskPerformHelpInfoDao creates and returns a new DAO object for table data access.
  45. func NewTaskPerformHelpInfoDao() *TaskPerformHelpInfoDao {
  46. return &TaskPerformHelpInfoDao{
  47. Group: "default",
  48. Table: "task_perform_help_info",
  49. Columns: taskPerformHelpInfoColumns,
  50. }
  51. }
  52. // DB retrieves and returns the underlying raw database management object of current DAO.
  53. func (dao *TaskPerformHelpInfoDao) DB() gdb.DB {
  54. return g.DB(dao.Group)
  55. }
  56. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  57. func (dao *TaskPerformHelpInfoDao) Ctx(ctx context.Context) *gdb.Model {
  58. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  59. }
  60. // Transaction wraps the transaction logic using function f.
  61. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  62. // It commits the transaction and returns nil if function f returns nil.
  63. //
  64. // Note that, you should not Commit or Rollback the transaction in function f
  65. // as it is automatically handled by this function.
  66. func (dao *TaskPerformHelpInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  67. return dao.Ctx(ctx).Transaction(ctx, f)
  68. }