order_article_review.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. // OrderArticleReviewDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type OrderArticleReviewDao 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 OrderArticleReviewColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // OrderArticleReviewColumns defines and stores column names for table order_article_review.
  17. type OrderArticleReviewColumns struct {
  18. OrderArticleId string // 作品审核id
  19. OrderId string // 订单id(order_info)id
  20. ArticleLink string // 作品链接列表
  21. AuditStatus string // 审核状态 1待审核 2审核通过 3审核驳回
  22. AuditOpinion string // 作品审核意见
  23. CreatedAt string // 创建时间(发货时间)
  24. ConfirmTime string // 确认收获时间
  25. }
  26. // orderArticleReviewColumns holds the columns for table order_article_review.
  27. var orderArticleReviewColumns = OrderArticleReviewColumns{
  28. OrderArticleId: "order_article_id",
  29. OrderId: "order_id",
  30. ArticleLink: "article_link",
  31. AuditStatus: "audit_status",
  32. AuditOpinion: "audit_opinion",
  33. CreatedAt: "created_at",
  34. ConfirmTime: "confirm_time",
  35. }
  36. // NewOrderArticleReviewDao creates and returns a new DAO object for table data access.
  37. func NewOrderArticleReviewDao() *OrderArticleReviewDao {
  38. return &OrderArticleReviewDao{
  39. Group: "default",
  40. Table: "order_article_review",
  41. Columns: orderArticleReviewColumns,
  42. }
  43. }
  44. // DB retrieves and returns the underlying raw database management object of current DAO.
  45. func (dao *OrderArticleReviewDao) DB() gdb.DB {
  46. return g.DB(dao.Group)
  47. }
  48. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  49. func (dao *OrderArticleReviewDao) Ctx(ctx context.Context) *gdb.Model {
  50. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  51. }
  52. // Transaction wraps the transaction logic using function f.
  53. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  54. // It commits the transaction and returns nil if function f returns nil.
  55. //
  56. // Note that, you should not Commit or Rollback the transaction in function f
  57. // as it is automatically handled by this function.
  58. func (dao *OrderArticleReviewDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  59. return dao.Ctx(ctx).Transaction(ctx, f)
  60. }