info_auto_task.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. // InfoAutoTaskDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type InfoAutoTaskDao 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 InfoAutoTaskColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // InfoAutoTaskColumns defines and stores column names for table info_auto_task.
  17. type InfoAutoTaskColumns struct {
  18. AutoTaskId string // 自动处理规则id
  19. SignInOffline string // 线下探店自动签收时间
  20. SignInVirtual string // 虚拟产品测评自动签收时间
  21. ReviewInMv string // 视频形式的审稿处理
  22. ReviewUnlimited string // 不限形式的审稿处理
  23. Postreview string // 发布审核自动处理
  24. CaseClose string // 结案自动处理
  25. Invalid string // 全流程项目失效自动处理
  26. DraftDefaultInPic string // 图片初稿违约自动处理
  27. DraftDefaultInMv string // 视频初稿违约自动处理
  28. ScriptDefault string // 脚本违约自动处理
  29. LinkBreach string // 链接违约自动处理
  30. CaseCloseDefault string // 结案违约自动处理
  31. Selectioninvalid string // 选品项目失效自动处理
  32. }
  33. // infoAutoTaskColumns holds the columns for table info_auto_task.
  34. var infoAutoTaskColumns = InfoAutoTaskColumns{
  35. AutoTaskId: "auto_task_id",
  36. SignInOffline: "sign_in_offline",
  37. SignInVirtual: "sign_in_virtual",
  38. ReviewInMv: "review_in_mv",
  39. ReviewUnlimited: "review_unlimited",
  40. Postreview: "postreview",
  41. CaseClose: "case_close",
  42. Invalid: "invalid",
  43. DraftDefaultInPic: "draft_default_in_pic",
  44. DraftDefaultInMv: "draft_default_in_mv",
  45. ScriptDefault: "script_default",
  46. LinkBreach: "link_breach",
  47. CaseCloseDefault: "case_close_default",
  48. Selectioninvalid: "selectioninvalid",
  49. }
  50. // NewInfoAutoTaskDao creates and returns a new DAO object for table data access.
  51. func NewInfoAutoTaskDao() *InfoAutoTaskDao {
  52. return &InfoAutoTaskDao{
  53. Group: "default",
  54. Table: "info_auto_task",
  55. Columns: infoAutoTaskColumns,
  56. }
  57. }
  58. // DB retrieves and returns the underlying raw database management object of current DAO.
  59. func (dao *InfoAutoTaskDao) DB() gdb.DB {
  60. return g.DB(dao.Group)
  61. }
  62. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  63. func (dao *InfoAutoTaskDao) Ctx(ctx context.Context) *gdb.Model {
  64. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  65. }
  66. // Transaction wraps the transaction logic using function f.
  67. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  68. // It commits the transaction and returns nil if function f returns nil.
  69. //
  70. // Note that, you should not Commit or Rollback the transaction in function f
  71. // as it is automatically handled by this function.
  72. func (dao *InfoAutoTaskDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  73. return dao.Ctx(ctx).Transaction(ctx, f)
  74. }