123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- // ==========================================================================
- // 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"
- )
- // OrderDataQualityDao is the manager for logic model data accessing and custom defined data operations functions management.
- type OrderDataQualityDao 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 OrderDataQualityColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // OrderDataQualityColumns defines and stores column names for table order_data_quality.
- type OrderDataQualityColumns struct {
- DataQualityId string // 数据质检id
- OrderId string // 报名信息(order_info)id
- DataLink string // 数据截图
- DataReview string // 数据质检审核意见
- CreatedAt string // 创建时间(发货时间)
- ConfirmTime string // 确认收获时间
- LikeNumber string // 点赞数
- LittleEye string // 小眼睛
- CommitNum string // 评论数
- CollectNum string // 收藏数
- }
- // orderDataQualityColumns holds the columns for table order_data_quality.
- var orderDataQualityColumns = OrderDataQualityColumns{
- DataQualityId: "data_quality_id",
- OrderId: "order_id",
- DataLink: "data_link",
- DataReview: "data_review",
- CreatedAt: "created_at",
- ConfirmTime: "confirm_time",
- LikeNumber: "like_number",
- LittleEye: "little_eye",
- CommitNum: "commit_num",
- CollectNum: "collect_num",
- }
- // NewOrderDataQualityDao creates and returns a new DAO object for table data access.
- func NewOrderDataQualityDao() *OrderDataQualityDao {
- return &OrderDataQualityDao{
- Group: "default",
- Table: "order_data_quality",
- Columns: orderDataQualityColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *OrderDataQualityDao) 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 *OrderDataQualityDao) 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 *OrderDataQualityDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|