order_data_quality.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. // OrderDataQualityDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type OrderDataQualityDao 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 OrderDataQualityColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // OrderDataQualityColumns defines and stores column names for table order_data_quality.
  17. type OrderDataQualityColumns struct {
  18. DataQualityId string // 数据质检id
  19. OrderId string // 报名信息(order_info)id
  20. DataLink string // 数据截图
  21. DataReview string // 数据质检审核意见
  22. CreatedAt string // 创建时间(发货时间)
  23. ConfirmTime string // 确认收获时间
  24. LikeNumber string // 点赞数
  25. LittleEye string // 小眼睛
  26. CommitNum string // 评论数
  27. CollectNum string // 收藏数
  28. }
  29. // orderDataQualityColumns holds the columns for table order_data_quality.
  30. var orderDataQualityColumns = OrderDataQualityColumns{
  31. DataQualityId: "data_quality_id",
  32. OrderId: "order_id",
  33. DataLink: "data_link",
  34. DataReview: "data_review",
  35. CreatedAt: "created_at",
  36. ConfirmTime: "confirm_time",
  37. LikeNumber: "like_number",
  38. LittleEye: "little_eye",
  39. CommitNum: "commit_num",
  40. CollectNum: "collect_num",
  41. }
  42. // NewOrderDataQualityDao creates and returns a new DAO object for table data access.
  43. func NewOrderDataQualityDao() *OrderDataQualityDao {
  44. return &OrderDataQualityDao{
  45. Group: "default",
  46. Table: "order_data_quality",
  47. Columns: orderDataQualityColumns,
  48. }
  49. }
  50. // DB retrieves and returns the underlying raw database management object of current DAO.
  51. func (dao *OrderDataQualityDao) DB() gdb.DB {
  52. return g.DB(dao.Group)
  53. }
  54. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  55. func (dao *OrderDataQualityDao) Ctx(ctx context.Context) *gdb.Model {
  56. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  57. }
  58. // Transaction wraps the transaction logic using function f.
  59. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  60. // It commits the transaction and returns nil if function f returns nil.
  61. //
  62. // Note that, you should not Commit or Rollback the transaction in function f
  63. // as it is automatically handled by this function.
  64. func (dao *OrderDataQualityDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  65. return dao.Ctx(ctx).Transaction(ctx, f)
  66. }