order_link_quality.go 2.8 KB

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