// Code generated by go-queryset. DO NOT EDIT.
package models

import (
	"errors"
	"fmt"
	"strings"
	"time"

	"github.com/jinzhu/gorm"
)

// ===== BEGIN of all query sets

// ===== BEGIN of query set GoodsCatQuerySet

// GoodsCatQuerySet is an queryset type for GoodsCat
type GoodsCatQuerySet struct {
	db *gorm.DB
}

// NewGoodsCatQuerySet constructs new GoodsCatQuerySet
func NewGoodsCatQuerySet(db *gorm.DB) GoodsCatQuerySet {
	return GoodsCatQuerySet{
		db: db.Model(&GoodsCat{}),
	}
}

func (qs GoodsCatQuerySet) w(db *gorm.DB) GoodsCatQuerySet {
	return NewGoodsCatQuerySet(db)
}

func (qs GoodsCatQuerySet) Select(fields ...GoodsCatDBSchemaField) GoodsCatQuerySet {
	names := []string{}
	for _, f := range fields {
		names = append(names, f.String())
	}

	return qs.w(qs.db.Select(strings.Join(names, ",")))
}

// Create is an autogenerated method
// nolint: dupl
func (o *GoodsCat) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

// Delete is an autogenerated method
// nolint: dupl
func (o *GoodsCat) Delete(db *gorm.DB) error {
	return db.Delete(o).Error
}

// All is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) All(ret *[]GoodsCat) error {
	return qs.db.Find(ret).Error
}

// Count is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}

// CreatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtEq(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at = ?", createdAt))
}

// CreatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtGt(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at > ?", createdAt))
}

// CreatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtGte(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at >= ?", createdAt))
}

// CreatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtLt(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at < ?", createdAt))
}

// CreatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtLte(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at <= ?", createdAt))
}

// CreatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) CreatedAtNe(createdAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("created_at != ?", createdAt))
}

// Delete is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) Delete() error {
	return qs.db.Delete(GoodsCat{}).Error
}

// DeleteNum is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeleteNum() (int64, error) {
	db := qs.db.Delete(GoodsCat{})
	return db.RowsAffected, db.Error
}

// DeleteNumUnscoped is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeleteNumUnscoped() (int64, error) {
	db := qs.db.Unscoped().Delete(GoodsCat{})
	return db.RowsAffected, db.Error
}

// DeletedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtEq(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at = ?", deletedAt))
}

// DeletedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtGt(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at > ?", deletedAt))
}

// DeletedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtGte(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at >= ?", deletedAt))
}

// DeletedAtIsNotNull is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtIsNotNull() GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NOT NULL"))
}

// DeletedAtIsNull is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtIsNull() GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NULL"))
}

// DeletedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtLt(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at < ?", deletedAt))
}

// DeletedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtLte(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at <= ?", deletedAt))
}

// DeletedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) DeletedAtNe(deletedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("deleted_at != ?", deletedAt))
}

// GetDB is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) GetDB() *gorm.DB {
	return qs.db
}

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) GetUpdater() GoodsCatUpdater {
	return NewGoodsCatUpdater(qs.db)
}

// IDEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDEq(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id = ?", ID))
}

// IDGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDGt(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id > ?", ID))
}

// IDGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDGte(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id >= ?", ID))
}

// IDIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDIn(ID ...uint32) GoodsCatQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id IN (?)", ID))
}

// IDLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDLt(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

// IDLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDLte(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id <= ?", ID))
}

// IDNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDNe(ID uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("id != ?", ID))
}

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) IDNotIn(ID ...uint32) GoodsCatQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id NOT IN (?)", ID))
}

// LevelEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelEq(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level = ?", level))
}

// LevelGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelGt(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level > ?", level))
}

// LevelGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelGte(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level >= ?", level))
}

// LevelIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelIn(level ...uint32) GoodsCatQuerySet {
	if len(level) == 0 {
		qs.db.AddError(errors.New("must at least pass one level in LevelIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("level IN (?)", level))
}

// LevelLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelLt(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level < ?", level))
}

// LevelLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelLte(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level <= ?", level))
}

// LevelNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelNe(level uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("level != ?", level))
}

// LevelNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) LevelNotIn(level ...uint32) GoodsCatQuerySet {
	if len(level) == 0 {
		qs.db.AddError(errors.New("must at least pass one level in LevelNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("level NOT IN (?)", level))
}

// Limit is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) Limit(limit int) GoodsCatQuerySet {
	return qs.w(qs.db.Limit(limit))
}

// NameEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameEq(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name = ?", name))
}

// NameGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameGt(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name > ?", name))
}

// NameGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameGte(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name >= ?", name))
}

// NameIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameIn(name ...string) GoodsCatQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name IN (?)", name))
}

// NameLike is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameLike(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name LIKE ?", name))
}

// NameLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameLt(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name < ?", name))
}

// NameLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameLte(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name <= ?", name))
}

// NameNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameNe(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name != ?", name))
}

// NameNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameNotIn(name ...string) GoodsCatQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name NOT IN (?)", name))
}

// NameNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) NameNotlike(name string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("name NOT LIKE ?", name))
}

// Offset is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) Offset(offset int) GoodsCatQuerySet {
	return qs.w(qs.db.Offset(offset))
}

// One is used to retrieve one result. It returns gorm.ErrRecordNotFound
// if nothing was fetched
func (qs GoodsCatQuerySet) One(ret *GoodsCat) error {
	return qs.db.First(ret).Error
}

// OrderAscByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByCreatedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("created_at ASC"))
}

// OrderAscByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByDeletedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("deleted_at ASC"))
}

// OrderAscByID is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByID() GoodsCatQuerySet {
	return qs.w(qs.db.Order("id ASC"))
}

// OrderAscByLevel is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByLevel() GoodsCatQuerySet {
	return qs.w(qs.db.Order("level ASC"))
}

// OrderAscByName is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByName() GoodsCatQuerySet {
	return qs.w(qs.db.Order("name ASC"))
}

// OrderAscByPid is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByPid() GoodsCatQuerySet {
	return qs.w(qs.db.Order("pid ASC"))
}

// OrderAscByPriority is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByPriority() GoodsCatQuerySet {
	return qs.w(qs.db.Order("priority ASC"))
}

// OrderAscBySort is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscBySort() GoodsCatQuerySet {
	return qs.w(qs.db.Order("sort ASC"))
}

// OrderAscByState is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByState() GoodsCatQuerySet {
	return qs.w(qs.db.Order("state ASC"))
}

// OrderAscByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderAscByUpdatedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("updated_at ASC"))
}

// OrderDescByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByCreatedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("created_at DESC"))
}

// OrderDescByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByDeletedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("deleted_at DESC"))
}

// OrderDescByID is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByID() GoodsCatQuerySet {
	return qs.w(qs.db.Order("id DESC"))
}

// OrderDescByLevel is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByLevel() GoodsCatQuerySet {
	return qs.w(qs.db.Order("level DESC"))
}

// OrderDescByName is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByName() GoodsCatQuerySet {
	return qs.w(qs.db.Order("name DESC"))
}

// OrderDescByPid is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByPid() GoodsCatQuerySet {
	return qs.w(qs.db.Order("pid DESC"))
}

// OrderDescByPriority is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByPriority() GoodsCatQuerySet {
	return qs.w(qs.db.Order("priority DESC"))
}

// OrderDescBySort is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescBySort() GoodsCatQuerySet {
	return qs.w(qs.db.Order("sort DESC"))
}

// OrderDescByState is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByState() GoodsCatQuerySet {
	return qs.w(qs.db.Order("state DESC"))
}

// OrderDescByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) OrderDescByUpdatedAt() GoodsCatQuerySet {
	return qs.w(qs.db.Order("updated_at DESC"))
}

// PidEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidEq(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid = ?", pid))
}

// PidGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidGt(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid > ?", pid))
}

// PidGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidGte(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid >= ?", pid))
}

// PidIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidIn(pid ...uint32) GoodsCatQuerySet {
	if len(pid) == 0 {
		qs.db.AddError(errors.New("must at least pass one pid in PidIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pid IN (?)", pid))
}

// PidLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidLt(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid < ?", pid))
}

// PidLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidLte(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid <= ?", pid))
}

// PidNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidNe(pid uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("pid != ?", pid))
}

// PidNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PidNotIn(pid ...uint32) GoodsCatQuerySet {
	if len(pid) == 0 {
		qs.db.AddError(errors.New("must at least pass one pid in PidNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pid NOT IN (?)", pid))
}

// PriorityEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityEq(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority = ?", priority))
}

// PriorityGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityGt(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority > ?", priority))
}

// PriorityGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityGte(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority >= ?", priority))
}

// PriorityIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityIn(priority ...string) GoodsCatQuerySet {
	if len(priority) == 0 {
		qs.db.AddError(errors.New("must at least pass one priority in PriorityIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("priority IN (?)", priority))
}

// PriorityLike is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityLike(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority LIKE ?", priority))
}

// PriorityLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityLt(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority < ?", priority))
}

// PriorityLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityLte(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority <= ?", priority))
}

// PriorityNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityNe(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority != ?", priority))
}

// PriorityNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityNotIn(priority ...string) GoodsCatQuerySet {
	if len(priority) == 0 {
		qs.db.AddError(errors.New("must at least pass one priority in PriorityNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("priority NOT IN (?)", priority))
}

// PriorityNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) PriorityNotlike(priority string) GoodsCatQuerySet {
	return qs.w(qs.db.Where("priority NOT LIKE ?", priority))
}

// SortEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortEq(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort = ?", sort))
}

// SortGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortGt(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort > ?", sort))
}

// SortGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortGte(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort >= ?", sort))
}

// SortIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortIn(sort ...uint32) GoodsCatQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort IN (?)", sort))
}

// SortLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortLt(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort < ?", sort))
}

// SortLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortLte(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort <= ?", sort))
}

// SortNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortNe(sort uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("sort != ?", sort))
}

// SortNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) SortNotIn(sort ...uint32) GoodsCatQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort NOT IN (?)", sort))
}

// StateEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateEq(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state = ?", state))
}

// StateGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateGt(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state > ?", state))
}

// StateGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateGte(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state >= ?", state))
}

// StateIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateIn(state ...uint32) GoodsCatQuerySet {
	if len(state) == 0 {
		qs.db.AddError(errors.New("must at least pass one state in StateIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("state IN (?)", state))
}

// StateLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateLt(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state < ?", state))
}

// StateLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateLte(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state <= ?", state))
}

// StateNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateNe(state uint32) GoodsCatQuerySet {
	return qs.w(qs.db.Where("state != ?", state))
}

// StateNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) StateNotIn(state ...uint32) GoodsCatQuerySet {
	if len(state) == 0 {
		qs.db.AddError(errors.New("must at least pass one state in StateNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("state NOT IN (?)", state))
}

// UpdatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtEq(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

// UpdatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtGt(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at > ?", updatedAt))
}

// UpdatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtGte(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at >= ?", updatedAt))
}

// UpdatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtLt(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at < ?", updatedAt))
}

// UpdatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtLte(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at <= ?", updatedAt))
}

// UpdatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCatQuerySet) UpdatedAtNe(updatedAt time.Time) GoodsCatQuerySet {
	return qs.w(qs.db.Where("updated_at != ?", updatedAt))
}

// SetCreatedAt is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetCreatedAt(createdAt time.Time) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.CreatedAt)] = createdAt
	return u
}

// SetDeletedAt is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetDeletedAt(deletedAt *time.Time) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.DeletedAt)] = deletedAt
	return u
}

// SetID is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetID(ID uint32) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.ID)] = ID
	return u
}

// SetLevel is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetLevel(level uint32) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.Level)] = level
	return u
}

// SetName is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetName(name string) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.Name)] = name
	return u
}

// SetPid is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetPid(pid uint32) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.Pid)] = pid
	return u
}

// SetPriority is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetPriority(priority string) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.Priority)] = priority
	return u
}

// SetSort is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetSort(sort uint32) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.Sort)] = sort
	return u
}

// SetState is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetState(state uint32) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.State)] = state
	return u
}

// SetUpdatedAt is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) SetUpdatedAt(updatedAt time.Time) GoodsCatUpdater {
	u.fields[string(GoodsCatDBSchema.UpdatedAt)] = updatedAt
	return u
}

// Update is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) Update() error {
	return u.db.Updates(u.fields).Error
}

// UpdateNum is an autogenerated method
// nolint: dupl
func (u GoodsCatUpdater) UpdateNum() (int64, error) {
	db := u.db.Updates(u.fields)
	return db.RowsAffected, db.Error
}

// ===== END of query set GoodsCatQuerySet

// ===== BEGIN of GoodsCat modifiers

// GoodsCatDBSchemaField describes database schema field. It requires for method 'Update'
type GoodsCatDBSchemaField string

// String method returns string representation of field.
// nolint: dupl
func (f GoodsCatDBSchemaField) String() string {
	return string(f)
}

// GoodsCatDBSchema stores db field names of GoodsCat
var GoodsCatDBSchema = struct {
	ID        GoodsCatDBSchemaField
	CreatedAt GoodsCatDBSchemaField
	UpdatedAt GoodsCatDBSchemaField
	DeletedAt GoodsCatDBSchemaField
	Name      GoodsCatDBSchemaField
	Priority  GoodsCatDBSchemaField
	State     GoodsCatDBSchemaField
	Level     GoodsCatDBSchemaField
	Pid       GoodsCatDBSchemaField
	Sort      GoodsCatDBSchemaField
}{

	ID:        GoodsCatDBSchemaField("id"),
	CreatedAt: GoodsCatDBSchemaField("created_at"),
	UpdatedAt: GoodsCatDBSchemaField("updated_at"),
	DeletedAt: GoodsCatDBSchemaField("deleted_at"),
	Name:      GoodsCatDBSchemaField("name"),
	Priority:  GoodsCatDBSchemaField("priority"),
	State:     GoodsCatDBSchemaField("state"),
	Level:     GoodsCatDBSchemaField("level"),
	Pid:       GoodsCatDBSchemaField("pid"),
	Sort:      GoodsCatDBSchemaField("sort"),
}

// Update updates GoodsCat fields by primary key
// nolint: dupl
func (o *GoodsCat) Update(db *gorm.DB, fields ...GoodsCatDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":         o.ID,
		"created_at": o.CreatedAt,
		"updated_at": o.UpdatedAt,
		"deleted_at": o.DeletedAt,
		"name":       o.Name,
		"priority":   o.Priority,
		"state":      o.State,
		"level":      o.Level,
		"pid":        o.Pid,
		"sort":       o.Sort,
	}
	u := map[string]interface{}{}
	for _, f := range fields {
		fs := f.String()
		u[fs] = dbNameToFieldName[fs]
	}
	if err := db.Model(o).Updates(u).Error; err != nil {
		if err == gorm.ErrRecordNotFound {
			return err
		}

		return fmt.Errorf("can't update GoodsCat %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

// GoodsCatUpdater is an GoodsCat updates manager
type GoodsCatUpdater struct {
	fields map[string]interface{}
	db     *gorm.DB
}

// NewGoodsCatUpdater creates new GoodsCat updater
// nolint: dupl
func NewGoodsCatUpdater(db *gorm.DB) GoodsCatUpdater {
	return GoodsCatUpdater{
		fields: map[string]interface{}{},
		db:     db.Model(&GoodsCat{}),
	}
}

// ===== END of GoodsCat modifiers

// ===== BEGIN of query set GoodsCategoryQuerySet

// GoodsCategoryQuerySet is an queryset type for GoodsCategory
type GoodsCategoryQuerySet struct {
	db *gorm.DB
}

// NewGoodsCategoryQuerySet constructs new GoodsCategoryQuerySet
func NewGoodsCategoryQuerySet(db *gorm.DB) GoodsCategoryQuerySet {
	return GoodsCategoryQuerySet{
		db: db.Model(&GoodsCategory{}),
	}
}

func (qs GoodsCategoryQuerySet) w(db *gorm.DB) GoodsCategoryQuerySet {
	return NewGoodsCategoryQuerySet(db)
}

func (qs GoodsCategoryQuerySet) Select(fields ...GoodsCategoryDBSchemaField) GoodsCategoryQuerySet {
	names := []string{}
	for _, f := range fields {
		names = append(names, f.String())
	}

	return qs.w(qs.db.Select(strings.Join(names, ",")))
}

// Create is an autogenerated method
// nolint: dupl
func (o *GoodsCategory) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

// Delete is an autogenerated method
// nolint: dupl
func (o *GoodsCategory) Delete(db *gorm.DB) error {
	return db.Delete(o).Error
}

// All is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) All(ret *[]GoodsCategory) error {
	return qs.db.Find(ret).Error
}

// CatIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdEq(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id = ?", catId))
}

// CatIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdGt(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id > ?", catId))
}

// CatIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdGte(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id >= ?", catId))
}

// CatIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdIn(catId ...uint32) GoodsCategoryQuerySet {
	if len(catId) == 0 {
		qs.db.AddError(errors.New("must at least pass one catId in CatIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_id IN (?)", catId))
}

// CatIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdLt(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id < ?", catId))
}

// CatIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdLte(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id <= ?", catId))
}

// CatIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdNe(catId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("cat_id != ?", catId))
}

// CatIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CatIdNotIn(catId ...uint32) GoodsCategoryQuerySet {
	if len(catId) == 0 {
		qs.db.AddError(errors.New("must at least pass one catId in CatIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_id NOT IN (?)", catId))
}

// Count is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}

// CreatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtEq(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at = ?", createdAt))
}

// CreatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtGt(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at > ?", createdAt))
}

// CreatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtGte(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at >= ?", createdAt))
}

// CreatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtLt(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at < ?", createdAt))
}

// CreatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtLte(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at <= ?", createdAt))
}

// CreatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) CreatedAtNe(createdAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("created_at != ?", createdAt))
}

// Delete is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) Delete() error {
	return qs.db.Delete(GoodsCategory{}).Error
}

// DeleteNum is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeleteNum() (int64, error) {
	db := qs.db.Delete(GoodsCategory{})
	return db.RowsAffected, db.Error
}

// DeleteNumUnscoped is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeleteNumUnscoped() (int64, error) {
	db := qs.db.Unscoped().Delete(GoodsCategory{})
	return db.RowsAffected, db.Error
}

// DeletedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtEq(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at = ?", deletedAt))
}

// DeletedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtGt(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at > ?", deletedAt))
}

// DeletedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtGte(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at >= ?", deletedAt))
}

// DeletedAtIsNotNull is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtIsNotNull() GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NOT NULL"))
}

// DeletedAtIsNull is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtIsNull() GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NULL"))
}

// DeletedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtLt(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at < ?", deletedAt))
}

// DeletedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtLte(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at <= ?", deletedAt))
}

// DeletedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) DeletedAtNe(deletedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("deleted_at != ?", deletedAt))
}

// GetDB is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) GetDB() *gorm.DB {
	return qs.db
}

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) GetUpdater() GoodsCategoryUpdater {
	return NewGoodsCategoryUpdater(qs.db)
}

// IDEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDEq(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id = ?", ID))
}

// IDGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDGt(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id > ?", ID))
}

// IDGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDGte(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id >= ?", ID))
}

// IDIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDIn(ID ...uint32) GoodsCategoryQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id IN (?)", ID))
}

// IDLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDLt(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

// IDLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDLte(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id <= ?", ID))
}

// IDNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDNe(ID uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("id != ?", ID))
}

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) IDNotIn(ID ...uint32) GoodsCategoryQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id NOT IN (?)", ID))
}

// LevelEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelEq(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level = ?", level))
}

// LevelGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelGt(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level > ?", level))
}

// LevelGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelGte(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level >= ?", level))
}

// LevelIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelIn(level ...uint32) GoodsCategoryQuerySet {
	if len(level) == 0 {
		qs.db.AddError(errors.New("must at least pass one level in LevelIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("level IN (?)", level))
}

// LevelLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelLt(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level < ?", level))
}

// LevelLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelLte(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level <= ?", level))
}

// LevelNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelNe(level uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("level != ?", level))
}

// LevelNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) LevelNotIn(level ...uint32) GoodsCategoryQuerySet {
	if len(level) == 0 {
		qs.db.AddError(errors.New("must at least pass one level in LevelNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("level NOT IN (?)", level))
}

// Limit is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) Limit(limit int) GoodsCategoryQuerySet {
	return qs.w(qs.db.Limit(limit))
}

// NameEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameEq(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name = ?", name))
}

// NameGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameGt(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name > ?", name))
}

// NameGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameGte(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name >= ?", name))
}

// NameIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameIn(name ...string) GoodsCategoryQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name IN (?)", name))
}

// NameLike is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameLike(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name LIKE ?", name))
}

// NameLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameLt(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name < ?", name))
}

// NameLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameLte(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name <= ?", name))
}

// NameNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameNe(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name != ?", name))
}

// NameNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameNotIn(name ...string) GoodsCategoryQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name NOT IN (?)", name))
}

// NameNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) NameNotlike(name string) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("name NOT LIKE ?", name))
}

// Offset is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) Offset(offset int) GoodsCategoryQuerySet {
	return qs.w(qs.db.Offset(offset))
}

// One is used to retrieve one result. It returns gorm.ErrRecordNotFound
// if nothing was fetched
func (qs GoodsCategoryQuerySet) One(ret *GoodsCategory) error {
	return qs.db.First(ret).Error
}

// OrderAscByCatId is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByCatId() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("cat_id ASC"))
}

// OrderAscByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByCreatedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("created_at ASC"))
}

// OrderAscByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByDeletedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("deleted_at ASC"))
}

// OrderAscByID is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByID() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("id ASC"))
}

// OrderAscByLevel is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByLevel() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("level ASC"))
}

// OrderAscByName is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByName() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("name ASC"))
}

// OrderAscByParentCatId is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByParentCatId() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("parent_cat_id ASC"))
}

// OrderAscBySort is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscBySort() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("sort ASC"))
}

// OrderAscByState is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByState() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("state ASC"))
}

// OrderAscByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderAscByUpdatedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("updated_at ASC"))
}

// OrderDescByCatId is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByCatId() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("cat_id DESC"))
}

// OrderDescByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByCreatedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("created_at DESC"))
}

// OrderDescByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByDeletedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("deleted_at DESC"))
}

// OrderDescByID is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByID() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("id DESC"))
}

// OrderDescByLevel is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByLevel() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("level DESC"))
}

// OrderDescByName is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByName() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("name DESC"))
}

// OrderDescByParentCatId is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByParentCatId() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("parent_cat_id DESC"))
}

// OrderDescBySort is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescBySort() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("sort DESC"))
}

// OrderDescByState is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByState() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("state DESC"))
}

// OrderDescByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) OrderDescByUpdatedAt() GoodsCategoryQuerySet {
	return qs.w(qs.db.Order("updated_at DESC"))
}

// ParentCatIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdEq(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id = ?", parentCatId))
}

// ParentCatIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdGt(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id > ?", parentCatId))
}

// ParentCatIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdGte(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id >= ?", parentCatId))
}

// ParentCatIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdIn(parentCatId ...uint32) GoodsCategoryQuerySet {
	if len(parentCatId) == 0 {
		qs.db.AddError(errors.New("must at least pass one parentCatId in ParentCatIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("parent_cat_id IN (?)", parentCatId))
}

// ParentCatIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdLt(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id < ?", parentCatId))
}

// ParentCatIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdLte(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id <= ?", parentCatId))
}

// ParentCatIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdNe(parentCatId uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("parent_cat_id != ?", parentCatId))
}

// ParentCatIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) ParentCatIdNotIn(parentCatId ...uint32) GoodsCategoryQuerySet {
	if len(parentCatId) == 0 {
		qs.db.AddError(errors.New("must at least pass one parentCatId in ParentCatIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("parent_cat_id NOT IN (?)", parentCatId))
}

// SortEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortEq(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort = ?", sort))
}

// SortGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortGt(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort > ?", sort))
}

// SortGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortGte(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort >= ?", sort))
}

// SortIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortIn(sort ...uint32) GoodsCategoryQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort IN (?)", sort))
}

// SortLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortLt(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort < ?", sort))
}

// SortLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortLte(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort <= ?", sort))
}

// SortNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortNe(sort uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("sort != ?", sort))
}

// SortNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) SortNotIn(sort ...uint32) GoodsCategoryQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort NOT IN (?)", sort))
}

// StateEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateEq(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state = ?", state))
}

// StateGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateGt(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state > ?", state))
}

// StateGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateGte(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state >= ?", state))
}

// StateIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateIn(state ...uint32) GoodsCategoryQuerySet {
	if len(state) == 0 {
		qs.db.AddError(errors.New("must at least pass one state in StateIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("state IN (?)", state))
}

// StateLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateLt(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state < ?", state))
}

// StateLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateLte(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state <= ?", state))
}

// StateNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateNe(state uint32) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("state != ?", state))
}

// StateNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) StateNotIn(state ...uint32) GoodsCategoryQuerySet {
	if len(state) == 0 {
		qs.db.AddError(errors.New("must at least pass one state in StateNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("state NOT IN (?)", state))
}

// UpdatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtEq(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

// UpdatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtGt(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at > ?", updatedAt))
}

// UpdatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtGte(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at >= ?", updatedAt))
}

// UpdatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtLt(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at < ?", updatedAt))
}

// UpdatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtLte(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at <= ?", updatedAt))
}

// UpdatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsCategoryQuerySet) UpdatedAtNe(updatedAt time.Time) GoodsCategoryQuerySet {
	return qs.w(qs.db.Where("updated_at != ?", updatedAt))
}

// SetCatId is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetCatId(catId uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.CatId)] = catId
	return u
}

// SetCreatedAt is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetCreatedAt(createdAt time.Time) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.CreatedAt)] = createdAt
	return u
}

// SetDeletedAt is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetDeletedAt(deletedAt *time.Time) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.DeletedAt)] = deletedAt
	return u
}

// SetID is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetID(ID uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.ID)] = ID
	return u
}

// SetLevel is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetLevel(level uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.Level)] = level
	return u
}

// SetName is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetName(name string) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.Name)] = name
	return u
}

// SetParentCatId is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetParentCatId(parentCatId uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.ParentCatId)] = parentCatId
	return u
}

// SetSort is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetSort(sort uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.Sort)] = sort
	return u
}

// SetState is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetState(state uint32) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.State)] = state
	return u
}

// SetUpdatedAt is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) SetUpdatedAt(updatedAt time.Time) GoodsCategoryUpdater {
	u.fields[string(GoodsCategoryDBSchema.UpdatedAt)] = updatedAt
	return u
}

// Update is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) Update() error {
	return u.db.Updates(u.fields).Error
}

// UpdateNum is an autogenerated method
// nolint: dupl
func (u GoodsCategoryUpdater) UpdateNum() (int64, error) {
	db := u.db.Updates(u.fields)
	return db.RowsAffected, db.Error
}

// ===== END of query set GoodsCategoryQuerySet

// ===== BEGIN of GoodsCategory modifiers

// GoodsCategoryDBSchemaField describes database schema field. It requires for method 'Update'
type GoodsCategoryDBSchemaField string

// String method returns string representation of field.
// nolint: dupl
func (f GoodsCategoryDBSchemaField) String() string {
	return string(f)
}

// GoodsCategoryDBSchema stores db field names of GoodsCategory
var GoodsCategoryDBSchema = struct {
	ID          GoodsCategoryDBSchemaField
	CreatedAt   GoodsCategoryDBSchemaField
	UpdatedAt   GoodsCategoryDBSchemaField
	DeletedAt   GoodsCategoryDBSchemaField
	CatId       GoodsCategoryDBSchemaField
	ParentCatId GoodsCategoryDBSchemaField
	Name        GoodsCategoryDBSchemaField
	Sort        GoodsCategoryDBSchemaField
	Level       GoodsCategoryDBSchemaField
	State       GoodsCategoryDBSchemaField
}{

	ID:          GoodsCategoryDBSchemaField("id"),
	CreatedAt:   GoodsCategoryDBSchemaField("created_at"),
	UpdatedAt:   GoodsCategoryDBSchemaField("updated_at"),
	DeletedAt:   GoodsCategoryDBSchemaField("deleted_at"),
	CatId:       GoodsCategoryDBSchemaField("cat_id"),
	ParentCatId: GoodsCategoryDBSchemaField("parent_cat_id"),
	Name:        GoodsCategoryDBSchemaField("name"),
	Sort:        GoodsCategoryDBSchemaField("sort"),
	Level:       GoodsCategoryDBSchemaField("level"),
	State:       GoodsCategoryDBSchemaField("state"),
}

// Update updates GoodsCategory fields by primary key
// nolint: dupl
func (o *GoodsCategory) Update(db *gorm.DB, fields ...GoodsCategoryDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":            o.ID,
		"created_at":    o.CreatedAt,
		"updated_at":    o.UpdatedAt,
		"deleted_at":    o.DeletedAt,
		"cat_id":        o.CatId,
		"parent_cat_id": o.ParentCatId,
		"name":          o.Name,
		"sort":          o.Sort,
		"level":         o.Level,
		"state":         o.State,
	}
	u := map[string]interface{}{}
	for _, f := range fields {
		fs := f.String()
		u[fs] = dbNameToFieldName[fs]
	}
	if err := db.Model(o).Updates(u).Error; err != nil {
		if err == gorm.ErrRecordNotFound {
			return err
		}

		return fmt.Errorf("can't update GoodsCategory %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

// GoodsCategoryUpdater is an GoodsCategory updates manager
type GoodsCategoryUpdater struct {
	fields map[string]interface{}
	db     *gorm.DB
}

// NewGoodsCategoryUpdater creates new GoodsCategory updater
// nolint: dupl
func NewGoodsCategoryUpdater(db *gorm.DB) GoodsCategoryUpdater {
	return GoodsCategoryUpdater{
		fields: map[string]interface{}{},
		db:     db.Model(&GoodsCategory{}),
	}
}

// ===== END of GoodsCategory modifiers

// ===== BEGIN of query set GoodsOrderQuerySet

// GoodsOrderQuerySet is an queryset type for GoodsOrder
type GoodsOrderQuerySet struct {
	db *gorm.DB
}

// NewGoodsOrderQuerySet constructs new GoodsOrderQuerySet
func NewGoodsOrderQuerySet(db *gorm.DB) GoodsOrderQuerySet {
	return GoodsOrderQuerySet{
		db: db.Model(&GoodsOrder{}),
	}
}

func (qs GoodsOrderQuerySet) w(db *gorm.DB) GoodsOrderQuerySet {
	return NewGoodsOrderQuerySet(db)
}

func (qs GoodsOrderQuerySet) Select(fields ...GoodsOrderDBSchemaField) GoodsOrderQuerySet {
	names := []string{}
	for _, f := range fields {
		names = append(names, f.String())
	}

	return qs.w(qs.db.Select(strings.Join(names, ",")))
}

// Create is an autogenerated method
// nolint: dupl
func (o *GoodsOrder) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

// Delete is an autogenerated method
// nolint: dupl
func (o *GoodsOrder) Delete(db *gorm.DB) error {
	return db.Delete(o).Error
}

// AddressIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdEq(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id = ?", addressId))
}

// AddressIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdGt(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id > ?", addressId))
}

// AddressIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdGte(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id >= ?", addressId))
}

// AddressIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdIn(addressId ...uint32) GoodsOrderQuerySet {
	if len(addressId) == 0 {
		qs.db.AddError(errors.New("must at least pass one addressId in AddressIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("address_id IN (?)", addressId))
}

// AddressIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdLt(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id < ?", addressId))
}

// AddressIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdLte(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id <= ?", addressId))
}

// AddressIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdNe(addressId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("address_id != ?", addressId))
}

// AddressIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AddressIdNotIn(addressId ...uint32) GoodsOrderQuerySet {
	if len(addressId) == 0 {
		qs.db.AddError(errors.New("must at least pass one addressId in AddressIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("address_id NOT IN (?)", addressId))
}

// All is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) All(ret *[]GoodsOrder) error {
	return qs.db.Find(ret).Error
}

// AmountEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountEq(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount = ?", amount))
}

// AmountGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountGt(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount > ?", amount))
}

// AmountGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountGte(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount >= ?", amount))
}

// AmountIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountIn(amount ...uint32) GoodsOrderQuerySet {
	if len(amount) == 0 {
		qs.db.AddError(errors.New("must at least pass one amount in AmountIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("amount IN (?)", amount))
}

// AmountLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountLt(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount < ?", amount))
}

// AmountLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountLte(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount <= ?", amount))
}

// AmountNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountNe(amount uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("amount != ?", amount))
}

// AmountNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) AmountNotIn(amount ...uint32) GoodsOrderQuerySet {
	if len(amount) == 0 {
		qs.db.AddError(errors.New("must at least pass one amount in AmountNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("amount NOT IN (?)", amount))
}

// Count is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}

// CreatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtEq(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at = ?", createdAt))
}

// CreatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtGt(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at > ?", createdAt))
}

// CreatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtGte(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at >= ?", createdAt))
}

// CreatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtLt(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at < ?", createdAt))
}

// CreatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtLte(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at <= ?", createdAt))
}

// CreatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) CreatedAtNe(createdAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("created_at != ?", createdAt))
}

// Delete is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) Delete() error {
	return qs.db.Delete(GoodsOrder{}).Error
}

// DeleteNum is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeleteNum() (int64, error) {
	db := qs.db.Delete(GoodsOrder{})
	return db.RowsAffected, db.Error
}

// DeleteNumUnscoped is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeleteNumUnscoped() (int64, error) {
	db := qs.db.Unscoped().Delete(GoodsOrder{})
	return db.RowsAffected, db.Error
}

// DeletedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtEq(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at = ?", deletedAt))
}

// DeletedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtGt(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at > ?", deletedAt))
}

// DeletedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtGte(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at >= ?", deletedAt))
}

// DeletedAtIsNotNull is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtIsNotNull() GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NOT NULL"))
}

// DeletedAtIsNull is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtIsNull() GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NULL"))
}

// DeletedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtLt(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at < ?", deletedAt))
}

// DeletedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtLte(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at <= ?", deletedAt))
}

// DeletedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeletedAtNe(deletedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("deleted_at != ?", deletedAt))
}

// DeliveryCompanyEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyEq(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company = ?", deliveryCompany))
}

// DeliveryCompanyGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyGt(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company > ?", deliveryCompany))
}

// DeliveryCompanyGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyGte(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company >= ?", deliveryCompany))
}

// DeliveryCompanyIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyIn(deliveryCompany ...string) GoodsOrderQuerySet {
	if len(deliveryCompany) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryCompany in DeliveryCompanyIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_company IN (?)", deliveryCompany))
}

// DeliveryCompanyLike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyLike(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company LIKE ?", deliveryCompany))
}

// DeliveryCompanyLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyLt(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company < ?", deliveryCompany))
}

// DeliveryCompanyLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyLte(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company <= ?", deliveryCompany))
}

// DeliveryCompanyNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyNe(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company != ?", deliveryCompany))
}

// DeliveryCompanyNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyNotIn(deliveryCompany ...string) GoodsOrderQuerySet {
	if len(deliveryCompany) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryCompany in DeliveryCompanyNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_company NOT IN (?)", deliveryCompany))
}

// DeliveryCompanyNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryCompanyNotlike(deliveryCompany string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_company NOT LIKE ?", deliveryCompany))
}

// DeliveryExtraInfoEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoEq(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info = ?", deliveryExtraInfo))
}

// DeliveryExtraInfoGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoGt(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info > ?", deliveryExtraInfo))
}

// DeliveryExtraInfoGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoGte(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info >= ?", deliveryExtraInfo))
}

// DeliveryExtraInfoIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoIn(deliveryExtraInfo ...string) GoodsOrderQuerySet {
	if len(deliveryExtraInfo) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryExtraInfo in DeliveryExtraInfoIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_extra_info IN (?)", deliveryExtraInfo))
}

// DeliveryExtraInfoLike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoLike(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info LIKE ?", deliveryExtraInfo))
}

// DeliveryExtraInfoLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoLt(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info < ?", deliveryExtraInfo))
}

// DeliveryExtraInfoLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoLte(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info <= ?", deliveryExtraInfo))
}

// DeliveryExtraInfoNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoNe(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info != ?", deliveryExtraInfo))
}

// DeliveryExtraInfoNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoNotIn(deliveryExtraInfo ...string) GoodsOrderQuerySet {
	if len(deliveryExtraInfo) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryExtraInfo in DeliveryExtraInfoNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_extra_info NOT IN (?)", deliveryExtraInfo))
}

// DeliveryExtraInfoNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryExtraInfoNotlike(deliveryExtraInfo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_extra_info NOT LIKE ?", deliveryExtraInfo))
}

// DeliveryFeeEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeEq(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee = ?", deliveryFee))
}

// DeliveryFeeGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeGt(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee > ?", deliveryFee))
}

// DeliveryFeeGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeGte(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee >= ?", deliveryFee))
}

// DeliveryFeeIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeIn(deliveryFee ...uint32) GoodsOrderQuerySet {
	if len(deliveryFee) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryFee in DeliveryFeeIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_fee IN (?)", deliveryFee))
}

// DeliveryFeeLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeLt(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee < ?", deliveryFee))
}

// DeliveryFeeLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeLte(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee <= ?", deliveryFee))
}

// DeliveryFeeNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeNe(deliveryFee uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_fee != ?", deliveryFee))
}

// DeliveryFeeNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryFeeNotIn(deliveryFee ...uint32) GoodsOrderQuerySet {
	if len(deliveryFee) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryFee in DeliveryFeeNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_fee NOT IN (?)", deliveryFee))
}

// DeliveryStatusEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusEq(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status = ?", deliveryStatus))
}

// DeliveryStatusGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusGt(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status > ?", deliveryStatus))
}

// DeliveryStatusGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusGte(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status >= ?", deliveryStatus))
}

// DeliveryStatusIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusIn(deliveryStatus ...uint32) GoodsOrderQuerySet {
	if len(deliveryStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryStatus in DeliveryStatusIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_status IN (?)", deliveryStatus))
}

// DeliveryStatusLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusLt(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status < ?", deliveryStatus))
}

// DeliveryStatusLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusLte(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status <= ?", deliveryStatus))
}

// DeliveryStatusNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusNe(deliveryStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_status != ?", deliveryStatus))
}

// DeliveryStatusNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryStatusNotIn(deliveryStatus ...uint32) GoodsOrderQuerySet {
	if len(deliveryStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryStatus in DeliveryStatusNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_status NOT IN (?)", deliveryStatus))
}

// DeliveryTrackingNoEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoEq(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no = ?", deliveryTrackingNo))
}

// DeliveryTrackingNoGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoGt(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no > ?", deliveryTrackingNo))
}

// DeliveryTrackingNoGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoGte(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no >= ?", deliveryTrackingNo))
}

// DeliveryTrackingNoIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoIn(deliveryTrackingNo ...string) GoodsOrderQuerySet {
	if len(deliveryTrackingNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryTrackingNo in DeliveryTrackingNoIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_tracking_no IN (?)", deliveryTrackingNo))
}

// DeliveryTrackingNoLike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoLike(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no LIKE ?", deliveryTrackingNo))
}

// DeliveryTrackingNoLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoLt(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no < ?", deliveryTrackingNo))
}

// DeliveryTrackingNoLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoLte(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no <= ?", deliveryTrackingNo))
}

// DeliveryTrackingNoNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoNe(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no != ?", deliveryTrackingNo))
}

// DeliveryTrackingNoNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoNotIn(deliveryTrackingNo ...string) GoodsOrderQuerySet {
	if len(deliveryTrackingNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryTrackingNo in DeliveryTrackingNoNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_tracking_no NOT IN (?)", deliveryTrackingNo))
}

// DeliveryTrackingNoNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) DeliveryTrackingNoNotlike(deliveryTrackingNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("delivery_tracking_no NOT LIKE ?", deliveryTrackingNo))
}

// GetDB is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GetDB() *gorm.DB {
	return qs.db
}

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GetUpdater() GoodsOrderUpdater {
	return NewGoodsOrderUpdater(qs.db)
}

// GoodsIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdEq(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id = ?", goodsId))
}

// GoodsIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdGt(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id > ?", goodsId))
}

// GoodsIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdGte(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id >= ?", goodsId))
}

// GoodsIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdIn(goodsId ...uint32) GoodsOrderQuerySet {
	if len(goodsId) == 0 {
		qs.db.AddError(errors.New("must at least pass one goodsId in GoodsIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("goods_id IN (?)", goodsId))
}

// GoodsIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdLt(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id < ?", goodsId))
}

// GoodsIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdLte(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id <= ?", goodsId))
}

// GoodsIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdNe(goodsId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("goods_id != ?", goodsId))
}

// GoodsIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) GoodsIdNotIn(goodsId ...uint32) GoodsOrderQuerySet {
	if len(goodsId) == 0 {
		qs.db.AddError(errors.New("must at least pass one goodsId in GoodsIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("goods_id NOT IN (?)", goodsId))
}

// IDEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDEq(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id = ?", ID))
}

// IDGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDGt(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id > ?", ID))
}

// IDGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDGte(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id >= ?", ID))
}

// IDIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDIn(ID ...uint32) GoodsOrderQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id IN (?)", ID))
}

// IDLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDLt(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

// IDLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDLte(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id <= ?", ID))
}

// IDNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDNe(ID uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("id != ?", ID))
}

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) IDNotIn(ID ...uint32) GoodsOrderQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id NOT IN (?)", ID))
}

// Limit is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) Limit(limit int) GoodsOrderQuerySet {
	return qs.w(qs.db.Limit(limit))
}

// Offset is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) Offset(offset int) GoodsOrderQuerySet {
	return qs.w(qs.db.Offset(offset))
}

// One is used to retrieve one result. It returns gorm.ErrRecordNotFound
// if nothing was fetched
func (qs GoodsOrderQuerySet) One(ret *GoodsOrder) error {
	return qs.db.First(ret).Error
}

// OrderAscByAddressId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByAddressId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("address_id ASC"))
}

// OrderAscByAmount is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByAmount() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("amount ASC"))
}

// OrderAscByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByCreatedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("created_at ASC"))
}

// OrderAscByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeletedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("deleted_at ASC"))
}

// OrderAscByDeliveryCompany is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeliveryCompany() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_company ASC"))
}

// OrderAscByDeliveryExtraInfo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeliveryExtraInfo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_extra_info ASC"))
}

// OrderAscByDeliveryFee is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeliveryFee() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_fee ASC"))
}

// OrderAscByDeliveryStatus is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeliveryStatus() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_status ASC"))
}

// OrderAscByDeliveryTrackingNo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByDeliveryTrackingNo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_tracking_no ASC"))
}

// OrderAscByGoodsId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByGoodsId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("goods_id ASC"))
}

// OrderAscByID is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByID() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("id ASC"))
}

// OrderAscByOrderId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByOrderId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("order_id ASC"))
}

// OrderAscByPayStatus is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByPayStatus() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_status ASC"))
}

// OrderAscByPayTime is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByPayTime() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_time ASC"))
}

// OrderAscByPayType is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByPayType() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_type ASC"))
}

// OrderAscByQuantity is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByQuantity() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("quantity ASC"))
}

// OrderAscBySerialNo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscBySerialNo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("serial_no ASC"))
}

// OrderAscByUid is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByUid() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("uid ASC"))
}

// OrderAscByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByUpdatedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("updated_at ASC"))
}

// OrderAscByVersionId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderAscByVersionId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("version_id ASC"))
}

// OrderDescByAddressId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByAddressId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("address_id DESC"))
}

// OrderDescByAmount is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByAmount() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("amount DESC"))
}

// OrderDescByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByCreatedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("created_at DESC"))
}

// OrderDescByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeletedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("deleted_at DESC"))
}

// OrderDescByDeliveryCompany is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeliveryCompany() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_company DESC"))
}

// OrderDescByDeliveryExtraInfo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeliveryExtraInfo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_extra_info DESC"))
}

// OrderDescByDeliveryFee is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeliveryFee() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_fee DESC"))
}

// OrderDescByDeliveryStatus is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeliveryStatus() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_status DESC"))
}

// OrderDescByDeliveryTrackingNo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByDeliveryTrackingNo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("delivery_tracking_no DESC"))
}

// OrderDescByGoodsId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByGoodsId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("goods_id DESC"))
}

// OrderDescByID is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByID() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("id DESC"))
}

// OrderDescByOrderId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByOrderId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("order_id DESC"))
}

// OrderDescByPayStatus is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByPayStatus() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_status DESC"))
}

// OrderDescByPayTime is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByPayTime() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_time DESC"))
}

// OrderDescByPayType is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByPayType() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("pay_type DESC"))
}

// OrderDescByQuantity is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByQuantity() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("quantity DESC"))
}

// OrderDescBySerialNo is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescBySerialNo() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("serial_no DESC"))
}

// OrderDescByUid is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByUid() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("uid DESC"))
}

// OrderDescByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByUpdatedAt() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("updated_at DESC"))
}

// OrderDescByVersionId is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderDescByVersionId() GoodsOrderQuerySet {
	return qs.w(qs.db.Order("version_id DESC"))
}

// OrderIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdEq(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id = ?", orderId))
}

// OrderIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdGt(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id > ?", orderId))
}

// OrderIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdGte(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id >= ?", orderId))
}

// OrderIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdIn(orderId ...uint32) GoodsOrderQuerySet {
	if len(orderId) == 0 {
		qs.db.AddError(errors.New("must at least pass one orderId in OrderIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("order_id IN (?)", orderId))
}

// OrderIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdLt(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id < ?", orderId))
}

// OrderIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdLte(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id <= ?", orderId))
}

// OrderIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdNe(orderId uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("order_id != ?", orderId))
}

// OrderIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) OrderIdNotIn(orderId ...uint32) GoodsOrderQuerySet {
	if len(orderId) == 0 {
		qs.db.AddError(errors.New("must at least pass one orderId in OrderIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("order_id NOT IN (?)", orderId))
}

// PayStatusEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusEq(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status = ?", payStatus))
}

// PayStatusGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusGt(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status > ?", payStatus))
}

// PayStatusGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusGte(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status >= ?", payStatus))
}

// PayStatusIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusIn(payStatus ...uint32) GoodsOrderQuerySet {
	if len(payStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one payStatus in PayStatusIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pay_status IN (?)", payStatus))
}

// PayStatusLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusLt(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status < ?", payStatus))
}

// PayStatusLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusLte(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status <= ?", payStatus))
}

// PayStatusNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusNe(payStatus uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_status != ?", payStatus))
}

// PayStatusNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayStatusNotIn(payStatus ...uint32) GoodsOrderQuerySet {
	if len(payStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one payStatus in PayStatusNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pay_status NOT IN (?)", payStatus))
}

// PayTimeEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeEq(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time = ?", payTime))
}

// PayTimeGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeGt(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time > ?", payTime))
}

// PayTimeGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeGte(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time >= ?", payTime))
}

// PayTimeLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeLt(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time < ?", payTime))
}

// PayTimeLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeLte(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time <= ?", payTime))
}

// PayTimeNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTimeNe(payTime time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_time != ?", payTime))
}

// PayTypeEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeEq(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type = ?", payType))
}

// PayTypeGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeGt(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type > ?", payType))
}

// PayTypeGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeGte(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type >= ?", payType))
}

// PayTypeIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeIn(payType ...uint32) GoodsOrderQuerySet {
	if len(payType) == 0 {
		qs.db.AddError(errors.New("must at least pass one payType in PayTypeIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pay_type IN (?)", payType))
}

// PayTypeLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeLt(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type < ?", payType))
}

// PayTypeLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeLte(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type <= ?", payType))
}

// PayTypeNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeNe(payType uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("pay_type != ?", payType))
}

// PayTypeNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) PayTypeNotIn(payType ...uint32) GoodsOrderQuerySet {
	if len(payType) == 0 {
		qs.db.AddError(errors.New("must at least pass one payType in PayTypeNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("pay_type NOT IN (?)", payType))
}

// QuantityEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityEq(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity = ?", quantity))
}

// QuantityGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityGt(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity > ?", quantity))
}

// QuantityGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityGte(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity >= ?", quantity))
}

// QuantityIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityIn(quantity ...uint32) GoodsOrderQuerySet {
	if len(quantity) == 0 {
		qs.db.AddError(errors.New("must at least pass one quantity in QuantityIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("quantity IN (?)", quantity))
}

// QuantityLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityLt(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity < ?", quantity))
}

// QuantityLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityLte(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity <= ?", quantity))
}

// QuantityNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityNe(quantity uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("quantity != ?", quantity))
}

// QuantityNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) QuantityNotIn(quantity ...uint32) GoodsOrderQuerySet {
	if len(quantity) == 0 {
		qs.db.AddError(errors.New("must at least pass one quantity in QuantityNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("quantity NOT IN (?)", quantity))
}

// SerialNoEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoEq(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no = ?", serialNo))
}

// SerialNoGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoGt(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no > ?", serialNo))
}

// SerialNoGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoGte(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no >= ?", serialNo))
}

// SerialNoIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoIn(serialNo ...string) GoodsOrderQuerySet {
	if len(serialNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one serialNo in SerialNoIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("serial_no IN (?)", serialNo))
}

// SerialNoLike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoLike(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no LIKE ?", serialNo))
}

// SerialNoLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoLt(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no < ?", serialNo))
}

// SerialNoLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoLte(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no <= ?", serialNo))
}

// SerialNoNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoNe(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no != ?", serialNo))
}

// SerialNoNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoNotIn(serialNo ...string) GoodsOrderQuerySet {
	if len(serialNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one serialNo in SerialNoNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("serial_no NOT IN (?)", serialNo))
}

// SerialNoNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) SerialNoNotlike(serialNo string) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("serial_no NOT LIKE ?", serialNo))
}

// UidEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidEq(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid = ?", uid))
}

// UidGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidGt(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid > ?", uid))
}

// UidGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidGte(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid >= ?", uid))
}

// UidIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidIn(uid ...uint32) GoodsOrderQuerySet {
	if len(uid) == 0 {
		qs.db.AddError(errors.New("must at least pass one uid in UidIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("uid IN (?)", uid))
}

// UidLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidLt(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

// UidLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidLte(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid <= ?", uid))
}

// UidNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidNe(uid uint32) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("uid != ?", uid))
}

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UidNotIn(uid ...uint32) GoodsOrderQuerySet {
	if len(uid) == 0 {
		qs.db.AddError(errors.New("must at least pass one uid in UidNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("uid NOT IN (?)", uid))
}

// UpdatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtEq(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

// UpdatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtGt(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at > ?", updatedAt))
}

// UpdatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtGte(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at >= ?", updatedAt))
}

// UpdatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtLt(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at < ?", updatedAt))
}

// UpdatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtLte(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at <= ?", updatedAt))
}

// UpdatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) UpdatedAtNe(updatedAt time.Time) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("updated_at != ?", updatedAt))
}

// VersionIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdEq(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id = ?", versionId))
}

// VersionIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdGt(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id > ?", versionId))
}

// VersionIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdGte(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id >= ?", versionId))
}

// VersionIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdIn(versionId ...uint64) GoodsOrderQuerySet {
	if len(versionId) == 0 {
		qs.db.AddError(errors.New("must at least pass one versionId in VersionIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("version_id IN (?)", versionId))
}

// VersionIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdLt(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id < ?", versionId))
}

// VersionIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdLte(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id <= ?", versionId))
}

// VersionIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdNe(versionId uint64) GoodsOrderQuerySet {
	return qs.w(qs.db.Where("version_id != ?", versionId))
}

// VersionIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsOrderQuerySet) VersionIdNotIn(versionId ...uint64) GoodsOrderQuerySet {
	if len(versionId) == 0 {
		qs.db.AddError(errors.New("must at least pass one versionId in VersionIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("version_id NOT IN (?)", versionId))
}

// SetAddressId is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetAddressId(addressId uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.AddressId)] = addressId
	return u
}

// SetAmount is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetAmount(amount uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.Amount)] = amount
	return u
}

// SetCreatedAt is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetCreatedAt(createdAt time.Time) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.CreatedAt)] = createdAt
	return u
}

// SetDeletedAt is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeletedAt(deletedAt *time.Time) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeletedAt)] = deletedAt
	return u
}

// SetDeliveryCompany is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeliveryCompany(deliveryCompany string) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeliveryCompany)] = deliveryCompany
	return u
}

// SetDeliveryExtraInfo is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeliveryExtraInfo(deliveryExtraInfo string) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeliveryExtraInfo)] = deliveryExtraInfo
	return u
}

// SetDeliveryFee is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeliveryFee(deliveryFee uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeliveryFee)] = deliveryFee
	return u
}

// SetDeliveryStatus is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeliveryStatus(deliveryStatus uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeliveryStatus)] = deliveryStatus
	return u
}

// SetDeliveryTrackingNo is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetDeliveryTrackingNo(deliveryTrackingNo string) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.DeliveryTrackingNo)] = deliveryTrackingNo
	return u
}

// SetGoodsId is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetGoodsId(goodsId uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.GoodsId)] = goodsId
	return u
}

// SetID is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetID(ID uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.ID)] = ID
	return u
}

// SetOrderId is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetOrderId(orderId uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.OrderId)] = orderId
	return u
}

// SetPayStatus is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetPayStatus(payStatus uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.PayStatus)] = payStatus
	return u
}

// SetPayTime is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetPayTime(payTime time.Time) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.PayTime)] = payTime
	return u
}

// SetPayType is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetPayType(payType uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.PayType)] = payType
	return u
}

// SetQuantity is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetQuantity(quantity uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.Quantity)] = quantity
	return u
}

// SetSerialNo is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetSerialNo(serialNo string) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.SerialNo)] = serialNo
	return u
}

// SetUid is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetUid(uid uint32) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.Uid)] = uid
	return u
}

// SetUpdatedAt is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetUpdatedAt(updatedAt time.Time) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.UpdatedAt)] = updatedAt
	return u
}

// SetVersionId is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) SetVersionId(versionId uint64) GoodsOrderUpdater {
	u.fields[string(GoodsOrderDBSchema.VersionId)] = versionId
	return u
}

// Update is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) Update() error {
	return u.db.Updates(u.fields).Error
}

// UpdateNum is an autogenerated method
// nolint: dupl
func (u GoodsOrderUpdater) UpdateNum() (int64, error) {
	db := u.db.Updates(u.fields)
	return db.RowsAffected, db.Error
}

// ===== END of query set GoodsOrderQuerySet

// ===== BEGIN of GoodsOrder modifiers

// GoodsOrderDBSchemaField describes database schema field. It requires for method 'Update'
type GoodsOrderDBSchemaField string

// String method returns string representation of field.
// nolint: dupl
func (f GoodsOrderDBSchemaField) String() string {
	return string(f)
}

// GoodsOrderDBSchema stores db field names of GoodsOrder
var GoodsOrderDBSchema = struct {
	ID                 GoodsOrderDBSchemaField
	CreatedAt          GoodsOrderDBSchemaField
	UpdatedAt          GoodsOrderDBSchemaField
	DeletedAt          GoodsOrderDBSchemaField
	OrderId            GoodsOrderDBSchemaField
	SerialNo           GoodsOrderDBSchemaField
	Uid                GoodsOrderDBSchemaField
	GoodsId            GoodsOrderDBSchemaField
	Amount             GoodsOrderDBSchemaField
	Quantity           GoodsOrderDBSchemaField
	PayType            GoodsOrderDBSchemaField
	PayTime            GoodsOrderDBSchemaField
	PayStatus          GoodsOrderDBSchemaField
	AddressId          GoodsOrderDBSchemaField
	DeliveryExtraInfo  GoodsOrderDBSchemaField
	DeliveryFee        GoodsOrderDBSchemaField
	DeliveryTrackingNo GoodsOrderDBSchemaField
	DeliveryCompany    GoodsOrderDBSchemaField
	DeliveryStatus     GoodsOrderDBSchemaField
	VersionId          GoodsOrderDBSchemaField
}{

	ID:                 GoodsOrderDBSchemaField("id"),
	CreatedAt:          GoodsOrderDBSchemaField("created_at"),
	UpdatedAt:          GoodsOrderDBSchemaField("updated_at"),
	DeletedAt:          GoodsOrderDBSchemaField("deleted_at"),
	OrderId:            GoodsOrderDBSchemaField("order_id"),
	SerialNo:           GoodsOrderDBSchemaField("serial_no"),
	Uid:                GoodsOrderDBSchemaField("uid"),
	GoodsId:            GoodsOrderDBSchemaField("goods_id"),
	Amount:             GoodsOrderDBSchemaField("amount"),
	Quantity:           GoodsOrderDBSchemaField("quantity"),
	PayType:            GoodsOrderDBSchemaField("pay_type"),
	PayTime:            GoodsOrderDBSchemaField("pay_time"),
	PayStatus:          GoodsOrderDBSchemaField("pay_status"),
	AddressId:          GoodsOrderDBSchemaField("address_id"),
	DeliveryExtraInfo:  GoodsOrderDBSchemaField("delivery_extra_info"),
	DeliveryFee:        GoodsOrderDBSchemaField("delivery_fee"),
	DeliveryTrackingNo: GoodsOrderDBSchemaField("delivery_tracking_no"),
	DeliveryCompany:    GoodsOrderDBSchemaField("delivery_company"),
	DeliveryStatus:     GoodsOrderDBSchemaField("delivery_status"),
	VersionId:          GoodsOrderDBSchemaField("version_id"),
}

// Update updates GoodsOrder fields by primary key
// nolint: dupl
func (o *GoodsOrder) Update(db *gorm.DB, fields ...GoodsOrderDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":                   o.ID,
		"created_at":           o.CreatedAt,
		"updated_at":           o.UpdatedAt,
		"deleted_at":           o.DeletedAt,
		"order_id":             o.OrderId,
		"serial_no":            o.SerialNo,
		"uid":                  o.Uid,
		"goods_id":             o.GoodsId,
		"amount":               o.Amount,
		"quantity":             o.Quantity,
		"pay_type":             o.PayType,
		"pay_time":             o.PayTime,
		"pay_status":           o.PayStatus,
		"address_id":           o.AddressId,
		"delivery_extra_info":  o.DeliveryExtraInfo,
		"delivery_fee":         o.DeliveryFee,
		"delivery_tracking_no": o.DeliveryTrackingNo,
		"delivery_company":     o.DeliveryCompany,
		"delivery_status":      o.DeliveryStatus,
		"version_id":           o.VersionId,
	}
	u := map[string]interface{}{}
	for _, f := range fields {
		fs := f.String()
		u[fs] = dbNameToFieldName[fs]
	}
	if err := db.Model(o).Updates(u).Error; err != nil {
		if err == gorm.ErrRecordNotFound {
			return err
		}

		return fmt.Errorf("can't update GoodsOrder %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

// GoodsOrderUpdater is an GoodsOrder updates manager
type GoodsOrderUpdater struct {
	fields map[string]interface{}
	db     *gorm.DB
}

// NewGoodsOrderUpdater creates new GoodsOrder updater
// nolint: dupl
func NewGoodsOrderUpdater(db *gorm.DB) GoodsOrderUpdater {
	return GoodsOrderUpdater{
		fields: map[string]interface{}{},
		db:     db.Model(&GoodsOrder{}),
	}
}

// ===== END of GoodsOrder modifiers

// ===== BEGIN of query set GoodsQuerySet

// GoodsQuerySet is an queryset type for Goods
type GoodsQuerySet struct {
	db *gorm.DB
}

// NewGoodsQuerySet constructs new GoodsQuerySet
func NewGoodsQuerySet(db *gorm.DB) GoodsQuerySet {
	return GoodsQuerySet{
		db: db.Model(&Goods{}),
	}
}

func (qs GoodsQuerySet) w(db *gorm.DB) GoodsQuerySet {
	return NewGoodsQuerySet(db)
}

func (qs GoodsQuerySet) Select(fields ...GoodsDBSchemaField) GoodsQuerySet {
	names := []string{}
	for _, f := range fields {
		names = append(names, f.String())
	}

	return qs.w(qs.db.Select(strings.Join(names, ",")))
}

// Create is an autogenerated method
// nolint: dupl
func (o *Goods) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

// Delete is an autogenerated method
// nolint: dupl
func (o *Goods) Delete(db *gorm.DB) error {
	return db.Delete(o).Error
}

// All is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) All(ret *[]Goods) error {
	return qs.db.Find(ret).Error
}

// CatIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdEq(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id = ?", catId))
}

// CatIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdGt(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id > ?", catId))
}

// CatIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdGte(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id >= ?", catId))
}

// CatIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdIn(catId ...uint32) GoodsQuerySet {
	if len(catId) == 0 {
		qs.db.AddError(errors.New("must at least pass one catId in CatIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_id IN (?)", catId))
}

// CatIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdLt(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id < ?", catId))
}

// CatIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdLte(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id <= ?", catId))
}

// CatIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdNe(catId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_id != ?", catId))
}

// CatIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatIdNotIn(catId ...uint32) GoodsQuerySet {
	if len(catId) == 0 {
		qs.db.AddError(errors.New("must at least pass one catId in CatIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_id NOT IN (?)", catId))
}

// CatSortEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortEq(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort = ?", catSort))
}

// CatSortGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortGt(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort > ?", catSort))
}

// CatSortGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortGte(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort >= ?", catSort))
}

// CatSortIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortIn(catSort ...uint32) GoodsQuerySet {
	if len(catSort) == 0 {
		qs.db.AddError(errors.New("must at least pass one catSort in CatSortIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_sort IN (?)", catSort))
}

// CatSortLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortLt(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort < ?", catSort))
}

// CatSortLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortLte(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort <= ?", catSort))
}

// CatSortNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortNe(catSort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("cat_sort != ?", catSort))
}

// CatSortNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CatSortNotIn(catSort ...uint32) GoodsQuerySet {
	if len(catSort) == 0 {
		qs.db.AddError(errors.New("must at least pass one catSort in CatSortNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("cat_sort NOT IN (?)", catSort))
}

// Count is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}

// CreatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtEq(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at = ?", createdAt))
}

// CreatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtGt(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at > ?", createdAt))
}

// CreatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtGte(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at >= ?", createdAt))
}

// CreatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtLt(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at < ?", createdAt))
}

// CreatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtLte(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at <= ?", createdAt))
}

// CreatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) CreatedAtNe(createdAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("created_at != ?", createdAt))
}

// DealTypeEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeEq(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type = ?", dealType))
}

// DealTypeGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeGt(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type > ?", dealType))
}

// DealTypeGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeGte(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type >= ?", dealType))
}

// DealTypeIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeIn(dealType ...uint32) GoodsQuerySet {
	if len(dealType) == 0 {
		qs.db.AddError(errors.New("must at least pass one dealType in DealTypeIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("deal_type IN (?)", dealType))
}

// DealTypeLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeLt(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type < ?", dealType))
}

// DealTypeLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeLte(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type <= ?", dealType))
}

// DealTypeNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeNe(dealType uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("deal_type != ?", dealType))
}

// DealTypeNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DealTypeNotIn(dealType ...uint32) GoodsQuerySet {
	if len(dealType) == 0 {
		qs.db.AddError(errors.New("must at least pass one dealType in DealTypeNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("deal_type NOT IN (?)", dealType))
}

// Delete is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) Delete() error {
	return qs.db.Delete(Goods{}).Error
}

// DeleteNum is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeleteNum() (int64, error) {
	db := qs.db.Delete(Goods{})
	return db.RowsAffected, db.Error
}

// DeleteNumUnscoped is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeleteNumUnscoped() (int64, error) {
	db := qs.db.Unscoped().Delete(Goods{})
	return db.RowsAffected, db.Error
}

// DeletedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtEq(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at = ?", deletedAt))
}

// DeletedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtGt(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at > ?", deletedAt))
}

// DeletedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtGte(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at >= ?", deletedAt))
}

// DeletedAtIsNotNull is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtIsNotNull() GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NOT NULL"))
}

// DeletedAtIsNull is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtIsNull() GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at IS NULL"))
}

// DeletedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtLt(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at < ?", deletedAt))
}

// DeletedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtLte(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at <= ?", deletedAt))
}

// DeletedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeletedAtNe(deletedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("deleted_at != ?", deletedAt))
}

// DeliveryFeeEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeEq(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee = ?", deliveryFee))
}

// DeliveryFeeGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeGt(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee > ?", deliveryFee))
}

// DeliveryFeeGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeGte(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee >= ?", deliveryFee))
}

// DeliveryFeeIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeIn(deliveryFee ...uint32) GoodsQuerySet {
	if len(deliveryFee) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryFee in DeliveryFeeIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_fee IN (?)", deliveryFee))
}

// DeliveryFeeLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeLt(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee < ?", deliveryFee))
}

// DeliveryFeeLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeLte(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee <= ?", deliveryFee))
}

// DeliveryFeeNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeNe(deliveryFee uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("delivery_fee != ?", deliveryFee))
}

// DeliveryFeeNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DeliveryFeeNotIn(deliveryFee ...uint32) GoodsQuerySet {
	if len(deliveryFee) == 0 {
		qs.db.AddError(errors.New("must at least pass one deliveryFee in DeliveryFeeNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("delivery_fee NOT IN (?)", deliveryFee))
}

// DetailEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailEq(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail = ?", detail))
}

// DetailGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailGt(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail > ?", detail))
}

// DetailGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailGte(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail >= ?", detail))
}

// DetailIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailIn(detail ...string) GoodsQuerySet {
	if len(detail) == 0 {
		qs.db.AddError(errors.New("must at least pass one detail in DetailIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("detail IN (?)", detail))
}

// DetailLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailLike(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail LIKE ?", detail))
}

// DetailLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailLt(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail < ?", detail))
}

// DetailLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailLte(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail <= ?", detail))
}

// DetailNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailNe(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail != ?", detail))
}

// DetailNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailNotIn(detail ...string) GoodsQuerySet {
	if len(detail) == 0 {
		qs.db.AddError(errors.New("must at least pass one detail in DetailNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("detail NOT IN (?)", detail))
}

// DetailNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) DetailNotlike(detail string) GoodsQuerySet {
	return qs.w(qs.db.Where("detail NOT LIKE ?", detail))
}

// GetDB is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GetDB() *gorm.DB {
	return qs.db
}

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GetUpdater() GoodsUpdater {
	return NewGoodsUpdater(qs.db)
}

// GoodsIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdEq(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id = ?", goodsId))
}

// GoodsIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdGt(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id > ?", goodsId))
}

// GoodsIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdGte(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id >= ?", goodsId))
}

// GoodsIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdIn(goodsId ...uint32) GoodsQuerySet {
	if len(goodsId) == 0 {
		qs.db.AddError(errors.New("must at least pass one goodsId in GoodsIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("goods_id IN (?)", goodsId))
}

// GoodsIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdLt(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id < ?", goodsId))
}

// GoodsIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdLte(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id <= ?", goodsId))
}

// GoodsIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdNe(goodsId uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("goods_id != ?", goodsId))
}

// GoodsIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) GoodsIdNotIn(goodsId ...uint32) GoodsQuerySet {
	if len(goodsId) == 0 {
		qs.db.AddError(errors.New("must at least pass one goodsId in GoodsIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("goods_id NOT IN (?)", goodsId))
}

// IDEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDEq(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id = ?", ID))
}

// IDGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDGt(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id > ?", ID))
}

// IDGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDGte(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id >= ?", ID))
}

// IDIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDIn(ID ...uint32) GoodsQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id IN (?)", ID))
}

// IDLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDLt(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

// IDLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDLte(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id <= ?", ID))
}

// IDNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDNe(ID uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("id != ?", ID))
}

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) IDNotIn(ID ...uint32) GoodsQuerySet {
	if len(ID) == 0 {
		qs.db.AddError(errors.New("must at least pass one ID in IDNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("id NOT IN (?)", ID))
}

// ImagesEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesEq(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images = ?", images))
}

// ImagesGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesGt(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images > ?", images))
}

// ImagesGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesGte(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images >= ?", images))
}

// ImagesIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesIn(images ...string) GoodsQuerySet {
	if len(images) == 0 {
		qs.db.AddError(errors.New("must at least pass one images in ImagesIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("images IN (?)", images))
}

// ImagesLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesLike(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images LIKE ?", images))
}

// ImagesLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesLt(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images < ?", images))
}

// ImagesLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesLte(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images <= ?", images))
}

// ImagesNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesNe(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images != ?", images))
}

// ImagesNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesNotIn(images ...string) GoodsQuerySet {
	if len(images) == 0 {
		qs.db.AddError(errors.New("must at least pass one images in ImagesNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("images NOT IN (?)", images))
}

// ImagesNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) ImagesNotlike(images string) GoodsQuerySet {
	return qs.w(qs.db.Where("images NOT LIKE ?", images))
}

// Limit is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) Limit(limit int) GoodsQuerySet {
	return qs.w(qs.db.Limit(limit))
}

// MainImageEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageEq(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image = ?", mainImage))
}

// MainImageGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageGt(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image > ?", mainImage))
}

// MainImageGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageGte(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image >= ?", mainImage))
}

// MainImageIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageIn(mainImage ...string) GoodsQuerySet {
	if len(mainImage) == 0 {
		qs.db.AddError(errors.New("must at least pass one mainImage in MainImageIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("main_image IN (?)", mainImage))
}

// MainImageLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageLike(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image LIKE ?", mainImage))
}

// MainImageLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageLt(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image < ?", mainImage))
}

// MainImageLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageLte(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image <= ?", mainImage))
}

// MainImageNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageNe(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image != ?", mainImage))
}

// MainImageNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageNotIn(mainImage ...string) GoodsQuerySet {
	if len(mainImage) == 0 {
		qs.db.AddError(errors.New("must at least pass one mainImage in MainImageNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("main_image NOT IN (?)", mainImage))
}

// MainImageNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) MainImageNotlike(mainImage string) GoodsQuerySet {
	return qs.w(qs.db.Where("main_image NOT LIKE ?", mainImage))
}

// NameEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameEq(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name = ?", name))
}

// NameGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameGt(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name > ?", name))
}

// NameGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameGte(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name >= ?", name))
}

// NameIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameIn(name ...string) GoodsQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name IN (?)", name))
}

// NameLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameLike(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name LIKE ?", name))
}

// NameLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameLt(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name < ?", name))
}

// NameLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameLte(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name <= ?", name))
}

// NameNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameNe(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name != ?", name))
}

// NameNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameNotIn(name ...string) GoodsQuerySet {
	if len(name) == 0 {
		qs.db.AddError(errors.New("must at least pass one name in NameNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("name NOT IN (?)", name))
}

// NameNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) NameNotlike(name string) GoodsQuerySet {
	return qs.w(qs.db.Where("name NOT LIKE ?", name))
}

// Offset is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) Offset(offset int) GoodsQuerySet {
	return qs.w(qs.db.Offset(offset))
}

// One is used to retrieve one result. It returns gorm.ErrRecordNotFound
// if nothing was fetched
func (qs GoodsQuerySet) One(ret *Goods) error {
	return qs.db.First(ret).Error
}

// OrderAscByCatId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByCatId() GoodsQuerySet {
	return qs.w(qs.db.Order("cat_id ASC"))
}

// OrderAscByCatSort is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByCatSort() GoodsQuerySet {
	return qs.w(qs.db.Order("cat_sort ASC"))
}

// OrderAscByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByCreatedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("created_at ASC"))
}

// OrderAscByDealType is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByDealType() GoodsQuerySet {
	return qs.w(qs.db.Order("deal_type ASC"))
}

// OrderAscByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByDeletedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("deleted_at ASC"))
}

// OrderAscByDeliveryFee is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByDeliveryFee() GoodsQuerySet {
	return qs.w(qs.db.Order("delivery_fee ASC"))
}

// OrderAscByDetail is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByDetail() GoodsQuerySet {
	return qs.w(qs.db.Order("detail ASC"))
}

// OrderAscByGoodsId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByGoodsId() GoodsQuerySet {
	return qs.w(qs.db.Order("goods_id ASC"))
}

// OrderAscByID is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByID() GoodsQuerySet {
	return qs.w(qs.db.Order("id ASC"))
}

// OrderAscByImages is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByImages() GoodsQuerySet {
	return qs.w(qs.db.Order("images ASC"))
}

// OrderAscByMainImage is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByMainImage() GoodsQuerySet {
	return qs.w(qs.db.Order("main_image ASC"))
}

// OrderAscByName is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByName() GoodsQuerySet {
	return qs.w(qs.db.Order("name ASC"))
}

// OrderAscByPriceOriginal is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByPriceOriginal() GoodsQuerySet {
	return qs.w(qs.db.Order("price_original ASC"))
}

// OrderAscBySaleStatus is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySaleStatus() GoodsQuerySet {
	return qs.w(qs.db.Order("sale_status ASC"))
}

// OrderAscBySerialNo is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySerialNo() GoodsQuerySet {
	return qs.w(qs.db.Order("serial_no ASC"))
}

// OrderAscBySoldCount is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySoldCount() GoodsQuerySet {
	return qs.w(qs.db.Order("sold_count ASC"))
}

// OrderAscBySort is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySort() GoodsQuerySet {
	return qs.w(qs.db.Order("sort ASC"))
}

// OrderAscBySpecIndex is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySpecIndex() GoodsQuerySet {
	return qs.w(qs.db.Order("spec_index ASC"))
}

// OrderAscBySpecList is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscBySpecList() GoodsQuerySet {
	return qs.w(qs.db.Order("spec_list ASC"))
}

// OrderAscByTitle is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByTitle() GoodsQuerySet {
	return qs.w(qs.db.Order("title ASC"))
}

// OrderAscByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByUpdatedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("updated_at ASC"))
}

// OrderAscByVersionId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderAscByVersionId() GoodsQuerySet {
	return qs.w(qs.db.Order("version_id ASC"))
}

// OrderDescByCatId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByCatId() GoodsQuerySet {
	return qs.w(qs.db.Order("cat_id DESC"))
}

// OrderDescByCatSort is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByCatSort() GoodsQuerySet {
	return qs.w(qs.db.Order("cat_sort DESC"))
}

// OrderDescByCreatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByCreatedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("created_at DESC"))
}

// OrderDescByDealType is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByDealType() GoodsQuerySet {
	return qs.w(qs.db.Order("deal_type DESC"))
}

// OrderDescByDeletedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByDeletedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("deleted_at DESC"))
}

// OrderDescByDeliveryFee is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByDeliveryFee() GoodsQuerySet {
	return qs.w(qs.db.Order("delivery_fee DESC"))
}

// OrderDescByDetail is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByDetail() GoodsQuerySet {
	return qs.w(qs.db.Order("detail DESC"))
}

// OrderDescByGoodsId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByGoodsId() GoodsQuerySet {
	return qs.w(qs.db.Order("goods_id DESC"))
}

// OrderDescByID is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByID() GoodsQuerySet {
	return qs.w(qs.db.Order("id DESC"))
}

// OrderDescByImages is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByImages() GoodsQuerySet {
	return qs.w(qs.db.Order("images DESC"))
}

// OrderDescByMainImage is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByMainImage() GoodsQuerySet {
	return qs.w(qs.db.Order("main_image DESC"))
}

// OrderDescByName is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByName() GoodsQuerySet {
	return qs.w(qs.db.Order("name DESC"))
}

// OrderDescByPriceOriginal is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByPriceOriginal() GoodsQuerySet {
	return qs.w(qs.db.Order("price_original DESC"))
}

// OrderDescBySaleStatus is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySaleStatus() GoodsQuerySet {
	return qs.w(qs.db.Order("sale_status DESC"))
}

// OrderDescBySerialNo is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySerialNo() GoodsQuerySet {
	return qs.w(qs.db.Order("serial_no DESC"))
}

// OrderDescBySoldCount is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySoldCount() GoodsQuerySet {
	return qs.w(qs.db.Order("sold_count DESC"))
}

// OrderDescBySort is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySort() GoodsQuerySet {
	return qs.w(qs.db.Order("sort DESC"))
}

// OrderDescBySpecIndex is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySpecIndex() GoodsQuerySet {
	return qs.w(qs.db.Order("spec_index DESC"))
}

// OrderDescBySpecList is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescBySpecList() GoodsQuerySet {
	return qs.w(qs.db.Order("spec_list DESC"))
}

// OrderDescByTitle is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByTitle() GoodsQuerySet {
	return qs.w(qs.db.Order("title DESC"))
}

// OrderDescByUpdatedAt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByUpdatedAt() GoodsQuerySet {
	return qs.w(qs.db.Order("updated_at DESC"))
}

// OrderDescByVersionId is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) OrderDescByVersionId() GoodsQuerySet {
	return qs.w(qs.db.Order("version_id DESC"))
}

// PriceOriginalEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalEq(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original = ?", priceOriginal))
}

// PriceOriginalGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalGt(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original > ?", priceOriginal))
}

// PriceOriginalGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalGte(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original >= ?", priceOriginal))
}

// PriceOriginalIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalIn(priceOriginal ...uint32) GoodsQuerySet {
	if len(priceOriginal) == 0 {
		qs.db.AddError(errors.New("must at least pass one priceOriginal in PriceOriginalIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("price_original IN (?)", priceOriginal))
}

// PriceOriginalLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalLt(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original < ?", priceOriginal))
}

// PriceOriginalLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalLte(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original <= ?", priceOriginal))
}

// PriceOriginalNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalNe(priceOriginal uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("price_original != ?", priceOriginal))
}

// PriceOriginalNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) PriceOriginalNotIn(priceOriginal ...uint32) GoodsQuerySet {
	if len(priceOriginal) == 0 {
		qs.db.AddError(errors.New("must at least pass one priceOriginal in PriceOriginalNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("price_original NOT IN (?)", priceOriginal))
}

// SaleStatusEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusEq(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status = ?", saleStatus))
}

// SaleStatusGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusGt(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status > ?", saleStatus))
}

// SaleStatusGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusGte(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status >= ?", saleStatus))
}

// SaleStatusIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusIn(saleStatus ...uint32) GoodsQuerySet {
	if len(saleStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one saleStatus in SaleStatusIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sale_status IN (?)", saleStatus))
}

// SaleStatusLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusLt(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status < ?", saleStatus))
}

// SaleStatusLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusLte(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status <= ?", saleStatus))
}

// SaleStatusNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusNe(saleStatus uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sale_status != ?", saleStatus))
}

// SaleStatusNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SaleStatusNotIn(saleStatus ...uint32) GoodsQuerySet {
	if len(saleStatus) == 0 {
		qs.db.AddError(errors.New("must at least pass one saleStatus in SaleStatusNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sale_status NOT IN (?)", saleStatus))
}

// SerialNoEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoEq(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no = ?", serialNo))
}

// SerialNoGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoGt(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no > ?", serialNo))
}

// SerialNoGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoGte(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no >= ?", serialNo))
}

// SerialNoIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoIn(serialNo ...string) GoodsQuerySet {
	if len(serialNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one serialNo in SerialNoIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("serial_no IN (?)", serialNo))
}

// SerialNoLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoLike(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no LIKE ?", serialNo))
}

// SerialNoLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoLt(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no < ?", serialNo))
}

// SerialNoLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoLte(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no <= ?", serialNo))
}

// SerialNoNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoNe(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no != ?", serialNo))
}

// SerialNoNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoNotIn(serialNo ...string) GoodsQuerySet {
	if len(serialNo) == 0 {
		qs.db.AddError(errors.New("must at least pass one serialNo in SerialNoNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("serial_no NOT IN (?)", serialNo))
}

// SerialNoNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SerialNoNotlike(serialNo string) GoodsQuerySet {
	return qs.w(qs.db.Where("serial_no NOT LIKE ?", serialNo))
}

// SoldCountEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountEq(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count = ?", soldCount))
}

// SoldCountGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountGt(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count > ?", soldCount))
}

// SoldCountGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountGte(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count >= ?", soldCount))
}

// SoldCountIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountIn(soldCount ...uint32) GoodsQuerySet {
	if len(soldCount) == 0 {
		qs.db.AddError(errors.New("must at least pass one soldCount in SoldCountIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sold_count IN (?)", soldCount))
}

// SoldCountLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountLt(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count < ?", soldCount))
}

// SoldCountLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountLte(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count <= ?", soldCount))
}

// SoldCountNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountNe(soldCount uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sold_count != ?", soldCount))
}

// SoldCountNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SoldCountNotIn(soldCount ...uint32) GoodsQuerySet {
	if len(soldCount) == 0 {
		qs.db.AddError(errors.New("must at least pass one soldCount in SoldCountNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sold_count NOT IN (?)", soldCount))
}

// SortEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortEq(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort = ?", sort))
}

// SortGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortGt(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort > ?", sort))
}

// SortGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortGte(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort >= ?", sort))
}

// SortIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortIn(sort ...uint32) GoodsQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort IN (?)", sort))
}

// SortLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortLt(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort < ?", sort))
}

// SortLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortLte(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort <= ?", sort))
}

// SortNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortNe(sort uint32) GoodsQuerySet {
	return qs.w(qs.db.Where("sort != ?", sort))
}

// SortNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SortNotIn(sort ...uint32) GoodsQuerySet {
	if len(sort) == 0 {
		qs.db.AddError(errors.New("must at least pass one sort in SortNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("sort NOT IN (?)", sort))
}

// SpecIndexEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexEq(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index = ?", specIndex))
}

// SpecIndexGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexGt(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index > ?", specIndex))
}

// SpecIndexGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexGte(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index >= ?", specIndex))
}

// SpecIndexIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexIn(specIndex ...string) GoodsQuerySet {
	if len(specIndex) == 0 {
		qs.db.AddError(errors.New("must at least pass one specIndex in SpecIndexIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("spec_index IN (?)", specIndex))
}

// SpecIndexLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexLike(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index LIKE ?", specIndex))
}

// SpecIndexLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexLt(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index < ?", specIndex))
}

// SpecIndexLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexLte(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index <= ?", specIndex))
}

// SpecIndexNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexNe(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index != ?", specIndex))
}

// SpecIndexNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexNotIn(specIndex ...string) GoodsQuerySet {
	if len(specIndex) == 0 {
		qs.db.AddError(errors.New("must at least pass one specIndex in SpecIndexNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("spec_index NOT IN (?)", specIndex))
}

// SpecIndexNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecIndexNotlike(specIndex string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_index NOT LIKE ?", specIndex))
}

// SpecListEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListEq(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list = ?", specList))
}

// SpecListGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListGt(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list > ?", specList))
}

// SpecListGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListGte(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list >= ?", specList))
}

// SpecListIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListIn(specList ...string) GoodsQuerySet {
	if len(specList) == 0 {
		qs.db.AddError(errors.New("must at least pass one specList in SpecListIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("spec_list IN (?)", specList))
}

// SpecListLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListLike(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list LIKE ?", specList))
}

// SpecListLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListLt(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list < ?", specList))
}

// SpecListLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListLte(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list <= ?", specList))
}

// SpecListNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListNe(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list != ?", specList))
}

// SpecListNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListNotIn(specList ...string) GoodsQuerySet {
	if len(specList) == 0 {
		qs.db.AddError(errors.New("must at least pass one specList in SpecListNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("spec_list NOT IN (?)", specList))
}

// SpecListNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) SpecListNotlike(specList string) GoodsQuerySet {
	return qs.w(qs.db.Where("spec_list NOT LIKE ?", specList))
}

// TitleEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleEq(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title = ?", title))
}

// TitleGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleGt(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title > ?", title))
}

// TitleGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleGte(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title >= ?", title))
}

// TitleIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleIn(title ...string) GoodsQuerySet {
	if len(title) == 0 {
		qs.db.AddError(errors.New("must at least pass one title in TitleIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("title IN (?)", title))
}

// TitleLike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleLike(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title LIKE ?", title))
}

// TitleLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleLt(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title < ?", title))
}

// TitleLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleLte(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title <= ?", title))
}

// TitleNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleNe(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title != ?", title))
}

// TitleNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleNotIn(title ...string) GoodsQuerySet {
	if len(title) == 0 {
		qs.db.AddError(errors.New("must at least pass one title in TitleNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("title NOT IN (?)", title))
}

// TitleNotlike is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) TitleNotlike(title string) GoodsQuerySet {
	return qs.w(qs.db.Where("title NOT LIKE ?", title))
}

// UpdatedAtEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtEq(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

// UpdatedAtGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtGt(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at > ?", updatedAt))
}

// UpdatedAtGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtGte(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at >= ?", updatedAt))
}

// UpdatedAtLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtLt(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at < ?", updatedAt))
}

// UpdatedAtLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtLte(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at <= ?", updatedAt))
}

// UpdatedAtNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) UpdatedAtNe(updatedAt time.Time) GoodsQuerySet {
	return qs.w(qs.db.Where("updated_at != ?", updatedAt))
}

// VersionIdEq is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdEq(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id = ?", versionId))
}

// VersionIdGt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdGt(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id > ?", versionId))
}

// VersionIdGte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdGte(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id >= ?", versionId))
}

// VersionIdIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdIn(versionId ...uint64) GoodsQuerySet {
	if len(versionId) == 0 {
		qs.db.AddError(errors.New("must at least pass one versionId in VersionIdIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("version_id IN (?)", versionId))
}

// VersionIdLt is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdLt(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id < ?", versionId))
}

// VersionIdLte is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdLte(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id <= ?", versionId))
}

// VersionIdNe is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdNe(versionId uint64) GoodsQuerySet {
	return qs.w(qs.db.Where("version_id != ?", versionId))
}

// VersionIdNotIn is an autogenerated method
// nolint: dupl
func (qs GoodsQuerySet) VersionIdNotIn(versionId ...uint64) GoodsQuerySet {
	if len(versionId) == 0 {
		qs.db.AddError(errors.New("must at least pass one versionId in VersionIdNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("version_id NOT IN (?)", versionId))
}

// SetCatId is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetCatId(catId uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.CatId)] = catId
	return u
}

// SetCatSort is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetCatSort(catSort uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.CatSort)] = catSort
	return u
}

// SetCreatedAt is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetCreatedAt(createdAt time.Time) GoodsUpdater {
	u.fields[string(GoodsDBSchema.CreatedAt)] = createdAt
	return u
}

// SetDealType is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetDealType(dealType uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.DealType)] = dealType
	return u
}

// SetDeletedAt is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetDeletedAt(deletedAt *time.Time) GoodsUpdater {
	u.fields[string(GoodsDBSchema.DeletedAt)] = deletedAt
	return u
}

// SetDeliveryFee is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetDeliveryFee(deliveryFee uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.DeliveryFee)] = deliveryFee
	return u
}

// SetDetail is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetDetail(detail string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.Detail)] = detail
	return u
}

// SetGoodsId is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetGoodsId(goodsId uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.GoodsId)] = goodsId
	return u
}

// SetID is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetID(ID uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.ID)] = ID
	return u
}

// SetImages is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetImages(images string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.Images)] = images
	return u
}

// SetMainImage is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetMainImage(mainImage string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.MainImage)] = mainImage
	return u
}

// SetName is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetName(name string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.Name)] = name
	return u
}

// SetPriceOriginal is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetPriceOriginal(priceOriginal uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.PriceOriginal)] = priceOriginal
	return u
}

// SetSaleStatus is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSaleStatus(saleStatus uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.SaleStatus)] = saleStatus
	return u
}

// SetSerialNo is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSerialNo(serialNo string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.SerialNo)] = serialNo
	return u
}

// SetSoldCount is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSoldCount(soldCount uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.SoldCount)] = soldCount
	return u
}

// SetSort is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSort(sort uint32) GoodsUpdater {
	u.fields[string(GoodsDBSchema.Sort)] = sort
	return u
}

// SetSpecIndex is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSpecIndex(specIndex string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.SpecIndex)] = specIndex
	return u
}

// SetSpecList is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetSpecList(specList string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.SpecList)] = specList
	return u
}

// SetTitle is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetTitle(title string) GoodsUpdater {
	u.fields[string(GoodsDBSchema.Title)] = title
	return u
}

// SetUpdatedAt is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetUpdatedAt(updatedAt time.Time) GoodsUpdater {
	u.fields[string(GoodsDBSchema.UpdatedAt)] = updatedAt
	return u
}

// SetVersionId is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) SetVersionId(versionId uint64) GoodsUpdater {
	u.fields[string(GoodsDBSchema.VersionId)] = versionId
	return u
}

// Update is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) Update() error {
	return u.db.Updates(u.fields).Error
}

// UpdateNum is an autogenerated method
// nolint: dupl
func (u GoodsUpdater) UpdateNum() (int64, error) {
	db := u.db.Updates(u.fields)
	return db.RowsAffected, db.Error
}

// ===== END of query set GoodsQuerySet

// ===== BEGIN of Goods modifiers

// GoodsDBSchemaField describes database schema field. It requires for method 'Update'
type GoodsDBSchemaField string

// String method returns string representation of field.
// nolint: dupl
func (f GoodsDBSchemaField) String() string {
	return string(f)
}

// GoodsDBSchema stores db field names of Goods
var GoodsDBSchema = struct {
	ID            GoodsDBSchemaField
	CreatedAt     GoodsDBSchemaField
	UpdatedAt     GoodsDBSchemaField
	DeletedAt     GoodsDBSchemaField
	GoodsId       GoodsDBSchemaField
	SerialNo      GoodsDBSchemaField
	CatId         GoodsDBSchemaField
	Name          GoodsDBSchemaField
	Title         GoodsDBSchemaField
	MainImage     GoodsDBSchemaField
	Images        GoodsDBSchemaField
	Detail        GoodsDBSchemaField
	SoldCount     GoodsDBSchemaField
	SaleStatus    GoodsDBSchemaField
	CatSort       GoodsDBSchemaField
	Sort          GoodsDBSchemaField
	SpecList      GoodsDBSchemaField
	SpecIndex     GoodsDBSchemaField
	PriceOriginal GoodsDBSchemaField
	DeliveryFee   GoodsDBSchemaField
	DealType      GoodsDBSchemaField
	VersionId     GoodsDBSchemaField
}{

	ID:            GoodsDBSchemaField("id"),
	CreatedAt:     GoodsDBSchemaField("created_at"),
	UpdatedAt:     GoodsDBSchemaField("updated_at"),
	DeletedAt:     GoodsDBSchemaField("deleted_at"),
	GoodsId:       GoodsDBSchemaField("goods_id"),
	SerialNo:      GoodsDBSchemaField("serial_no"),
	CatId:         GoodsDBSchemaField("cat_id"),
	Name:          GoodsDBSchemaField("name"),
	Title:         GoodsDBSchemaField("title"),
	MainImage:     GoodsDBSchemaField("main_image"),
	Images:        GoodsDBSchemaField("images"),
	Detail:        GoodsDBSchemaField("detail"),
	SoldCount:     GoodsDBSchemaField("sold_count"),
	SaleStatus:    GoodsDBSchemaField("sale_status"),
	CatSort:       GoodsDBSchemaField("cat_sort"),
	Sort:          GoodsDBSchemaField("sort"),
	SpecList:      GoodsDBSchemaField("spec_list"),
	SpecIndex:     GoodsDBSchemaField("spec_index"),
	PriceOriginal: GoodsDBSchemaField("price_original"),
	DeliveryFee:   GoodsDBSchemaField("delivery_fee"),
	DealType:      GoodsDBSchemaField("deal_type"),
	VersionId:     GoodsDBSchemaField("version_id"),
}

// Update updates Goods fields by primary key
// nolint: dupl
func (o *Goods) Update(db *gorm.DB, fields ...GoodsDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":             o.ID,
		"created_at":     o.CreatedAt,
		"updated_at":     o.UpdatedAt,
		"deleted_at":     o.DeletedAt,
		"goods_id":       o.GoodsId,
		"serial_no":      o.SerialNo,
		"cat_id":         o.CatId,
		"name":           o.Name,
		"title":          o.Title,
		"main_image":     o.MainImage,
		"images":         o.Images,
		"detail":         o.Detail,
		"sold_count":     o.SoldCount,
		"sale_status":    o.SaleStatus,
		"cat_sort":       o.CatSort,
		"sort":           o.Sort,
		"spec_list":      o.SpecList,
		"spec_index":     o.SpecIndex,
		"price_original": o.PriceOriginal,
		"delivery_fee":   o.DeliveryFee,
		"deal_type":      o.DealType,
		"version_id":     o.VersionId,
	}
	u := map[string]interface{}{}
	for _, f := range fields {
		fs := f.String()
		u[fs] = dbNameToFieldName[fs]
	}
	if err := db.Model(o).Updates(u).Error; err != nil {
		if err == gorm.ErrRecordNotFound {
			return err
		}

		return fmt.Errorf("can't update Goods %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

// GoodsUpdater is an Goods updates manager
type GoodsUpdater struct {
	fields map[string]interface{}
	db     *gorm.DB
}

// NewGoodsUpdater creates new Goods updater
// nolint: dupl
func NewGoodsUpdater(db *gorm.DB) GoodsUpdater {
	return GoodsUpdater{
		fields: map[string]interface{}{},
		db:     db.Model(&Goods{}),
	}
}

// ===== END of Goods modifiers

// ===== END of all query sets
