// ========================================================================== // 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" ) // OrderArticleReviewDao is the manager for logic model data accessing and custom defined data operations functions management. type OrderArticleReviewDao 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 OrderArticleReviewColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage. } // OrderArticleReviewColumns defines and stores column names for table order_article_review. type OrderArticleReviewColumns struct { OrderArticleId string // 作品审核id OrderId string // 订单id(order_info)id ArticleLink string // 作品链接列表 AuditStatus string // 审核状态 1待审核 2审核通过 3审核驳回 AuditOpinion string // 作品审核意见 CreatedAt string // 创建时间(发货时间) ConfirmTime string // 确认收获时间 } // orderArticleReviewColumns holds the columns for table order_article_review. var orderArticleReviewColumns = OrderArticleReviewColumns{ OrderArticleId: "order_article_id", OrderId: "order_id", ArticleLink: "article_link", AuditStatus: "audit_status", AuditOpinion: "audit_opinion", CreatedAt: "created_at", ConfirmTime: "confirm_time", } // NewOrderArticleReviewDao creates and returns a new DAO object for table data access. func NewOrderArticleReviewDao() *OrderArticleReviewDao { return &OrderArticleReviewDao{ Group: "default", Table: "order_article_review", Columns: orderArticleReviewColumns, } } // DB retrieves and returns the underlying raw database management object of current DAO. func (dao *OrderArticleReviewDao) 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 *OrderArticleReviewDao) 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 *OrderArticleReviewDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) { return dao.Ctx(ctx).Transaction(ctx, f) }