order_data_review.go 3.0 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. // OrderDataReviewDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type OrderDataReviewDao 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 OrderDataReviewColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // OrderDataReviewColumns defines and stores column names for table order_data_review.
  17. type OrderDataReviewColumns struct {
  18. DataQualityId string // 数据质检id
  19. OrderId string // 报名信息(order_info)id
  20. LikeNumber string // 点赞数
  21. LittleEye string // 小眼睛
  22. CommitNum string // 评论数
  23. CollectNum string // 收藏数
  24. DataLink string // 数据截图列表
  25. AuditStatus string // 审核状态 1待审核 2审核通过 3审核失败
  26. AuditOpinion string // 数据质检审核意见
  27. CreatedAt string // 创建时间(发货时间)
  28. ConfirmTime string // 确认收获时间
  29. }
  30. // orderDataReviewColumns holds the columns for table order_data_review.
  31. var orderDataReviewColumns = OrderDataReviewColumns{
  32. DataQualityId: "data_quality_id",
  33. OrderId: "order_id",
  34. LikeNumber: "like_number",
  35. LittleEye: "little_eye",
  36. CommitNum: "commit_num",
  37. CollectNum: "collect_num",
  38. DataLink: "data_link",
  39. AuditStatus: "audit_status",
  40. AuditOpinion: "audit_opinion",
  41. CreatedAt: "created_at",
  42. ConfirmTime: "confirm_time",
  43. }
  44. // NewOrderDataReviewDao creates and returns a new DAO object for table data access.
  45. func NewOrderDataReviewDao() *OrderDataReviewDao {
  46. return &OrderDataReviewDao{
  47. Group: "default",
  48. Table: "order_data_review",
  49. Columns: orderDataReviewColumns,
  50. }
  51. }
  52. // DB retrieves and returns the underlying raw database management object of current DAO.
  53. func (dao *OrderDataReviewDao) 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 *OrderDataReviewDao) 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 *OrderDataReviewDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  67. return dao.Ctx(ctx).Transaction(ctx, f)
  68. }