info_auto_task.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. }
  32. // infoAutoTaskColumns holds the columns for table info_auto_task.
  33. var infoAutoTaskColumns = InfoAutoTaskColumns{
  34. AutoTaskId: "auto_task_id",
  35. SignInOffline: "sign_in_offline",
  36. SignInVirtual: "sign_in_virtual",
  37. ReviewInMv: "review_in_mv",
  38. ReviewUnlimited: "review_unlimited",
  39. Postreview: "postreview",
  40. CaseClose: "case_close",
  41. Invalid: "invalid",
  42. DraftDefaultInPic: "draft_default_in_pic",
  43. DraftDefaultInMv: "draft_default_in_mv",
  44. ScriptDefault: "script_default",
  45. LinkBreach: "link_breach",
  46. CaseCloseDefault: "case_close_default",
  47. }
  48. // NewInfoAutoTaskDao creates and returns a new DAO object for table data access.
  49. func NewInfoAutoTaskDao() *InfoAutoTaskDao {
  50. return &InfoAutoTaskDao{
  51. Group: "default",
  52. Table: "info_auto_task",
  53. Columns: infoAutoTaskColumns,
  54. }
  55. }
  56. // DB retrieves and returns the underlying raw database management object of current DAO.
  57. func (dao *InfoAutoTaskDao) DB() gdb.DB {
  58. return g.DB(dao.Group)
  59. }
  60. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  61. func (dao *InfoAutoTaskDao) Ctx(ctx context.Context) *gdb.Model {
  62. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  63. }
  64. // Transaction wraps the transaction logic using function f.
  65. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  66. // It commits the transaction and returns nil if function f returns nil.
  67. //
  68. // Note that, you should not Commit or Rollback the transaction in function f
  69. // as it is automatically handled by this function.
  70. func (dao *InfoAutoTaskDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  71. return dao.Ctx(ctx).Transaction(ctx, f)
  72. }