// ========================================================================== // Code generated by GoFrame CLI tool. DO NOT EDIT. // ========================================================================== package internal import ( "context" "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/frame/g" ) // OrderLinkQualityDao is the manager for logic model data accessing and custom defined data operations functions management. type OrderLinkQualityDao struct { Table string // Table is the underlying table name of the DAO. Group string // Group is the database configuration group name of current DAO. Columns OrderLinkQualityColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // OrderLinkQualityColumns defines and stores column names for table order_link_quality. type OrderLinkQualityColumns struct { LinkQualityId string // 链接质检id OrderId string // 报名信息(order_info)id PostLink string // 发布链接 PhotoLink string // 图片链接 AuditStatus string // 审核状态 1待审核 2审核成功 3审核失败 AuditOpinion string // 审核意见 CreatedAt string // 创建时间(发货时间) ConfirmTime string // 确认收获时间 } // orderLinkQualityColumns holds the columns for table order_link_quality. var orderLinkQualityColumns = OrderLinkQualityColumns{ LinkQualityId: "link_quality_id", OrderId: "order_id", PostLink: "post_link", PhotoLink: "photo_link", AuditStatus: "audit_status", AuditOpinion: "audit_opinion", CreatedAt: "created_at", ConfirmTime: "confirm_time", } // NewOrderLinkQualityDao creates and returns a new DAO object for table data access. func NewOrderLinkQualityDao() *OrderLinkQualityDao { return &OrderLinkQualityDao{ Group: "default", Table: "order_link_quality", Columns: orderLinkQualityColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *OrderLinkQualityDao) DB() gdb.DB { return g.DB(dao.Group) } // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. func (dao *OrderLinkQualityDao) Ctx(ctx context.Context) *gdb.Model { return dao.DB().Model(dao.Table).Safe().Ctx(ctx) } // Transaction wraps the transaction logic using function f. // It rollbacks the transaction and returns the error from function f if it returns non-nil error. // It commits the transaction and returns nil if function f returns nil. // // Note that, you should not Commit or Rollback the transaction in function f // as it is automatically handled by this function. func (dao *OrderLinkQualityDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }