younggee_data_info.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. // YounggeeDataInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YounggeeDataInfoDao 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 YounggeeDataInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YounggeeDataInfoColumns defines and stores column names for table younggee_data_info.
  17. type YounggeeDataInfoColumns struct {
  18. DataId string // 脚本id
  19. TaskId string // 任务id
  20. PlayNumber string // 播放量/阅读量
  21. LikeNumber string // 点赞数
  22. CommentNumber string // 评论数
  23. CollectNumber string // 收藏数
  24. PhotoUrl string // 数据截图url
  25. ReviseOpinion string // 审核意见
  26. IsSubmit string // 是否提交
  27. IsReview string // 是否审核
  28. IsOk string // 是否合格
  29. CreateAt string // 创建时间
  30. SubmitAt string // 提交时间
  31. AgreeAt string // 同意时间
  32. RejectAt string // 驳回时间
  33. AutoAgreeAt string // 结案自动处理时间
  34. AutoDataBreakAt string // 结案违约自动处理时间
  35. }
  36. // younggeeDataInfoColumns holds the columns for table younggee_data_info.
  37. var younggeeDataInfoColumns = YounggeeDataInfoColumns{
  38. DataId: "data_id",
  39. TaskId: "task_id",
  40. PlayNumber: "play_number",
  41. LikeNumber: "like_number",
  42. CommentNumber: "comment_number",
  43. CollectNumber: "collect_number",
  44. PhotoUrl: "photo_url",
  45. ReviseOpinion: "revise_opinion",
  46. IsSubmit: "is_submit",
  47. IsReview: "is_review",
  48. IsOk: "is_ok",
  49. CreateAt: "create_at",
  50. SubmitAt: "submit_at",
  51. AgreeAt: "agree_at",
  52. RejectAt: "reject_at",
  53. AutoAgreeAt: "auto_agree_at",
  54. AutoDataBreakAt: "auto_data_break_at",
  55. }
  56. // NewYounggeeDataInfoDao creates and returns a new DAO object for table data access.
  57. func NewYounggeeDataInfoDao() *YounggeeDataInfoDao {
  58. return &YounggeeDataInfoDao{
  59. Group: "default",
  60. Table: "younggee_data_info",
  61. Columns: younggeeDataInfoColumns,
  62. }
  63. }
  64. // DB retrieves and returns the underlying raw database management object of current DAO.
  65. func (dao *YounggeeDataInfoDao) DB() gdb.DB {
  66. return g.DB(dao.Group)
  67. }
  68. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  69. func (dao *YounggeeDataInfoDao) Ctx(ctx context.Context) *gdb.Model {
  70. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  71. }
  72. // Transaction wraps the transaction logic using function f.
  73. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  74. // It commits the transaction and returns nil if function f returns nil.
  75. //
  76. // Note that, you should not Commit or Rollback the transaction in function f
  77. // as it is automatically handled by this function.
  78. func (dao *YounggeeDataInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  79. return dao.Ctx(ctx).Transaction(ctx, f)
  80. }