// ==========================================================================
// 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"
)

// OrderDataReviewDao is the manager for logic model data accessing and custom defined data operations functions management.
type OrderDataReviewDao 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 OrderDataReviewColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
}

// OrderDataReviewColumns defines and stores column names for table order_data_review.
type OrderDataReviewColumns struct {
	DataQualityId  string // 数据质检id                            
    OrderId        string // 报名信息(order_info)id                
    LikeNumber     string // 点赞数                                
    LittleEye      string // 小眼睛                                
    CommitNum      string // 评论数                                
    CollectNum     string // 收藏数                                
    DataLink       string // 数据截图列表                          
    AuditStatus    string // 审核状态 1待审核 2审核通过 3审核失败  
    AuditOpinion   string // 数据质检审核意见                      
    CreatedAt      string // 创建时间(发货时间)                    
    ConfirmTime    string // 确认收获时间
}

//  orderDataReviewColumns holds the columns for table order_data_review.
var orderDataReviewColumns = OrderDataReviewColumns{
	DataQualityId: "data_quality_id",  
            OrderId:       "order_id",         
            LikeNumber:    "like_number",      
            LittleEye:     "little_eye",       
            CommitNum:     "commit_num",       
            CollectNum:    "collect_num",      
            DataLink:      "data_link",        
            AuditStatus:   "audit_status",     
            AuditOpinion:  "audit_opinion",    
            CreatedAt:     "created_at",       
            ConfirmTime:   "confirm_time",
}

// NewOrderDataReviewDao creates and returns a new DAO object for table data access.
func NewOrderDataReviewDao() *OrderDataReviewDao {
	return &OrderDataReviewDao{
		Group:   "default",
		Table:   "order_data_review",
		Columns: orderDataReviewColumns,
	}
}

// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *OrderDataReviewDao) 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 *OrderDataReviewDao) 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 *OrderDataReviewDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
	return dao.Ctx(ctx).Transaction(ctx, f)
}