// 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 ShareCardBillGameQuerySet

// ShareCardBillGameQuerySet is an queryset type for ShareCardBillGame
type ShareCardBillGameQuerySet struct {
	db *gorm.DB
}

// NewShareCardBillGameQuerySet constructs new ShareCardBillGameQuerySet
func NewShareCardBillGameQuerySet(db *gorm.DB) ShareCardBillGameQuerySet {
	return ShareCardBillGameQuerySet{
		db: db.Model(&ShareCardBillGame{}),
	}
}

func (qs ShareCardBillGameQuerySet) w(db *gorm.DB) ShareCardBillGameQuerySet {
	return NewShareCardBillGameQuerySet(db)
}

func (qs ShareCardBillGameQuerySet) Select(fields ...ShareCardBillGameDBSchemaField) ShareCardBillGameQuerySet {
	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 *ShareCardBillGame) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

// BillSnEq is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnEq(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn = ?", billSn))
}

// BillSnGt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnGt(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn > ?", billSn))
}

// BillSnGte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnGte(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn >= ?", billSn))
}

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

// BillSnLike is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnLike(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn LIKE ?", billSn))
}

// BillSnLt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnLt(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn < ?", billSn))
}

// BillSnLte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnLte(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn <= ?", billSn))
}

// BillSnNe is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnNe(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn != ?", billSn))
}

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

// BillSnNotlike is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) BillSnNotlike(billSn string) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("bill_sn NOT LIKE ?", billSn))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GameCardIdEq is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdEq(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id = ?", gameCardId))
}

// GameCardIdGt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdGt(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id > ?", gameCardId))
}

// GameCardIdGte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdGte(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id >= ?", gameCardId))
}

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

// GameCardIdLt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdLt(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id < ?", gameCardId))
}

// GameCardIdLte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdLte(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id <= ?", gameCardId))
}

// GameCardIdNe is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GameCardIdNe(gameCardId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("game_card_id != ?", gameCardId))
}

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) GetUpdater() ShareCardBillGameUpdater {
	return NewShareCardBillGameUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) IDIn(ID ...uint32) ShareCardBillGameQuerySet {
	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 ShareCardBillGameQuerySet) IDLt(ID uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) IDNotIn(ID ...uint32) ShareCardBillGameQuerySet {
	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 ShareCardBillGameQuerySet) Limit(limit int) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

// OrderAscByBillSn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderAscByBillSn() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("bill_sn ASC"))
}

// OrderAscByCount is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderAscByCount() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("count ASC"))
}

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

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

// OrderAscByGameCardId is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderAscByGameCardId() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("game_card_id ASC"))
}

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

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

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

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

// OrderAscByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderAscByUserShareCardBillId() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id ASC"))
}

// OrderDescByBillSn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderDescByBillSn() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("bill_sn DESC"))
}

// OrderDescByCount is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderDescByCount() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("count DESC"))
}

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

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

// OrderDescByGameCardId is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderDescByGameCardId() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("game_card_id DESC"))
}

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

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

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

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

// OrderDescByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) OrderDescByUserShareCardBillId() ShareCardBillGameQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id DESC"))
}

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

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

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

// StateIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) StateIn(state ...string) ShareCardBillGameQuerySet {
	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))
}

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

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

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

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

// StateNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) StateNotIn(state ...string) ShareCardBillGameQuerySet {
	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))
}

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

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

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

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

// UidIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UidIn(uid ...uint32) ShareCardBillGameQuerySet {
	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 ShareCardBillGameQuerySet) UidLt(uid uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

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

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

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UidNotIn(uid ...uint32) ShareCardBillGameQuerySet {
	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 ShareCardBillGameQuerySet) UpdatedAtEq(updatedAt time.Time) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

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

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

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

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

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

// UserShareCardBillIdEq is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdEq(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id = ?", userShareCardBillId))
}

// UserShareCardBillIdGt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdGt(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id > ?", userShareCardBillId))
}

// UserShareCardBillIdGte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdGte(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id >= ?", userShareCardBillId))
}

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

// UserShareCardBillIdLt is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdLt(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id < ?", userShareCardBillId))
}

// UserShareCardBillIdLte is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdLte(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id <= ?", userShareCardBillId))
}

// UserShareCardBillIdNe is an autogenerated method
// nolint: dupl
func (qs ShareCardBillGameQuerySet) UserShareCardBillIdNe(userShareCardBillId uint32) ShareCardBillGameQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id != ?", userShareCardBillId))
}

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

// SetBillSn is an autogenerated method
// nolint: dupl
func (u ShareCardBillGameUpdater) SetBillSn(billSn string) ShareCardBillGameUpdater {
	u.fields[string(ShareCardBillGameDBSchema.BillSn)] = billSn
	return u
}

// SetCount is an autogenerated method
// nolint: dupl
func (u ShareCardBillGameUpdater) SetCount(count uint32) ShareCardBillGameUpdater {
	u.fields[string(ShareCardBillGameDBSchema.Count)] = count
	return u
}

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

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

// SetGameCardId is an autogenerated method
// nolint: dupl
func (u ShareCardBillGameUpdater) SetGameCardId(gameCardId uint32) ShareCardBillGameUpdater {
	u.fields[string(ShareCardBillGameDBSchema.GameCardId)] = gameCardId
	return u
}

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

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

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

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

// SetUserShareCardBillId is an autogenerated method
// nolint: dupl
func (u ShareCardBillGameUpdater) SetUserShareCardBillId(userShareCardBillId uint32) ShareCardBillGameUpdater {
	u.fields[string(ShareCardBillGameDBSchema.UserShareCardBillId)] = userShareCardBillId
	return u
}

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

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

// ===== END of query set ShareCardBillGameQuerySet

// ===== BEGIN of ShareCardBillGame modifiers

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

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

// ShareCardBillGameDBSchema stores db field names of ShareCardBillGame
var ShareCardBillGameDBSchema = struct {
	ID                  ShareCardBillGameDBSchemaField
	CreatedAt           ShareCardBillGameDBSchemaField
	UpdatedAt           ShareCardBillGameDBSchemaField
	DeletedAt           ShareCardBillGameDBSchemaField
	UserShareCardBillId ShareCardBillGameDBSchemaField
	Uid                 ShareCardBillGameDBSchemaField
	GameCardId          ShareCardBillGameDBSchemaField
	BillSn              ShareCardBillGameDBSchemaField
	Count               ShareCardBillGameDBSchemaField
	State               ShareCardBillGameDBSchemaField
}{

	ID:                  ShareCardBillGameDBSchemaField("id"),
	CreatedAt:           ShareCardBillGameDBSchemaField("created_at"),
	UpdatedAt:           ShareCardBillGameDBSchemaField("updated_at"),
	DeletedAt:           ShareCardBillGameDBSchemaField("deleted_at"),
	UserShareCardBillId: ShareCardBillGameDBSchemaField("user_share_card_bill_id"),
	Uid:                 ShareCardBillGameDBSchemaField("uid"),
	GameCardId:          ShareCardBillGameDBSchemaField("game_card_id"),
	BillSn:              ShareCardBillGameDBSchemaField("bill_sn"),
	Count:               ShareCardBillGameDBSchemaField("count"),
	State:               ShareCardBillGameDBSchemaField("state"),
}

// Update updates ShareCardBillGame fields by primary key
// nolint: dupl
func (o *ShareCardBillGame) Update(db *gorm.DB, fields ...ShareCardBillGameDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":                      o.ID,
		"created_at":              o.CreatedAt,
		"updated_at":              o.UpdatedAt,
		"deleted_at":              o.DeletedAt,
		"user_share_card_bill_id": o.UserShareCardBillId,
		"uid":                     o.Uid,
		"game_card_id":            o.GameCardId,
		"bill_sn":                 o.BillSn,
		"count":                   o.Count,
		"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 ShareCardBillGame %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of ShareCardBillGame modifiers

// ===== BEGIN of query set ShareCardDateVmQuerySet

// ShareCardDateVmQuerySet is an queryset type for ShareCardDateVm
type ShareCardDateVmQuerySet struct {
	db *gorm.DB
}

// NewShareCardDateVmQuerySet constructs new ShareCardDateVmQuerySet
func NewShareCardDateVmQuerySet(db *gorm.DB) ShareCardDateVmQuerySet {
	return ShareCardDateVmQuerySet{
		db: db.Model(&ShareCardDateVm{}),
	}
}

func (qs ShareCardDateVmQuerySet) w(db *gorm.DB) ShareCardDateVmQuerySet {
	return NewShareCardDateVmQuerySet(db)
}

func (qs ShareCardDateVmQuerySet) Select(fields ...ShareCardDateVmDBSchemaField) ShareCardDateVmQuerySet {
	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 *ShareCardDateVm) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) GetUpdater() ShareCardDateVmUpdater {
	return NewShareCardDateVmUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) IDIn(ID ...uint32) ShareCardDateVmQuerySet {
	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 ShareCardDateVmQuerySet) IDLt(ID uint32) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) IDNotIn(ID ...uint32) ShareCardDateVmQuerySet {
	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 ShareCardDateVmQuerySet) Limit(limit int) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

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

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

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

// OrderAscByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) OrderAscByProvideDate() ShareCardDateVmQuerySet {
	return qs.w(qs.db.Order("provide_date ASC"))
}

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

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

// OrderAscByVm is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) OrderAscByVm() ShareCardDateVmQuerySet {
	return qs.w(qs.db.Order("vm ASC"))
}

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

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

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

// OrderDescByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) OrderDescByProvideDate() ShareCardDateVmQuerySet {
	return qs.w(qs.db.Order("provide_date DESC"))
}

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

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

// OrderDescByVm is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) OrderDescByVm() ShareCardDateVmQuerySet {
	return qs.w(qs.db.Order("vm DESC"))
}

// ProvideDateEq is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateEq(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date = ?", provideDate))
}

// ProvideDateGt is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateGt(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date > ?", provideDate))
}

// ProvideDateGte is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateGte(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date >= ?", provideDate))
}

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

// ProvideDateLike is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateLike(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date LIKE ?", provideDate))
}

// ProvideDateLt is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateLt(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date < ?", provideDate))
}

// ProvideDateLte is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateLte(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date <= ?", provideDate))
}

// ProvideDateNe is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateNe(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date != ?", provideDate))
}

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

// ProvideDateNotlike is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) ProvideDateNotlike(provideDate string) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("provide_date NOT LIKE ?", provideDate))
}

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

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

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

// UidIn is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) UidIn(uid ...uint32) ShareCardDateVmQuerySet {
	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 ShareCardDateVmQuerySet) UidLt(uid uint32) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

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

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

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardDateVmQuerySet) UidNotIn(uid ...uint32) ShareCardDateVmQuerySet {
	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 ShareCardDateVmQuerySet) UpdatedAtEq(updatedAt time.Time) ShareCardDateVmQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SetProvideDate is an autogenerated method
// nolint: dupl
func (u ShareCardDateVmUpdater) SetProvideDate(provideDate string) ShareCardDateVmUpdater {
	u.fields[string(ShareCardDateVmDBSchema.ProvideDate)] = provideDate
	return u
}

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

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

// SetVm is an autogenerated method
// nolint: dupl
func (u ShareCardDateVmUpdater) SetVm(vm uint32) ShareCardDateVmUpdater {
	u.fields[string(ShareCardDateVmDBSchema.Vm)] = vm
	return u
}

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

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

// ===== END of query set ShareCardDateVmQuerySet

// ===== BEGIN of ShareCardDateVm modifiers

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

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

// ShareCardDateVmDBSchema stores db field names of ShareCardDateVm
var ShareCardDateVmDBSchema = struct {
	ID          ShareCardDateVmDBSchemaField
	CreatedAt   ShareCardDateVmDBSchemaField
	UpdatedAt   ShareCardDateVmDBSchemaField
	DeletedAt   ShareCardDateVmDBSchemaField
	Uid         ShareCardDateVmDBSchemaField
	Vm          ShareCardDateVmDBSchemaField
	ProvideDate ShareCardDateVmDBSchemaField
}{

	ID:          ShareCardDateVmDBSchemaField("id"),
	CreatedAt:   ShareCardDateVmDBSchemaField("created_at"),
	UpdatedAt:   ShareCardDateVmDBSchemaField("updated_at"),
	DeletedAt:   ShareCardDateVmDBSchemaField("deleted_at"),
	Uid:         ShareCardDateVmDBSchemaField("uid"),
	Vm:          ShareCardDateVmDBSchemaField("vm"),
	ProvideDate: ShareCardDateVmDBSchemaField("provide_date"),
}

// Update updates ShareCardDateVm fields by primary key
// nolint: dupl
func (o *ShareCardDateVm) Update(db *gorm.DB, fields ...ShareCardDateVmDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":           o.ID,
		"created_at":   o.CreatedAt,
		"updated_at":   o.UpdatedAt,
		"deleted_at":   o.DeletedAt,
		"uid":          o.Uid,
		"vm":           o.Vm,
		"provide_date": o.ProvideDate,
	}
	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 ShareCardDateVm %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of ShareCardDateVm modifiers

// ===== BEGIN of query set ShareCardGameVmQuerySet

// ShareCardGameVmQuerySet is an queryset type for ShareCardGameVm
type ShareCardGameVmQuerySet struct {
	db *gorm.DB
}

// NewShareCardGameVmQuerySet constructs new ShareCardGameVmQuerySet
func NewShareCardGameVmQuerySet(db *gorm.DB) ShareCardGameVmQuerySet {
	return ShareCardGameVmQuerySet{
		db: db.Model(&ShareCardGameVm{}),
	}
}

func (qs ShareCardGameVmQuerySet) w(db *gorm.DB) ShareCardGameVmQuerySet {
	return NewShareCardGameVmQuerySet(db)
}

func (qs ShareCardGameVmQuerySet) Select(fields ...ShareCardGameVmDBSchemaField) ShareCardGameVmQuerySet {
	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 *ShareCardGameVm) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

// CardProfitEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitEq(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit = ?", cardProfit))
}

// CardProfitGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitGt(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit > ?", cardProfit))
}

// CardProfitGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitGte(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit >= ?", cardProfit))
}

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

// CardProfitLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitLt(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit < ?", cardProfit))
}

// CardProfitLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitLte(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit <= ?", cardProfit))
}

// CardProfitNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) CardProfitNe(cardProfit uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("card_profit != ?", cardProfit))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GameCardIdEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdEq(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id = ?", gameCardId))
}

// GameCardIdGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdGt(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id > ?", gameCardId))
}

// GameCardIdGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdGte(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id >= ?", gameCardId))
}

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

// GameCardIdLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdLt(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id < ?", gameCardId))
}

// GameCardIdLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdLte(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id <= ?", gameCardId))
}

// GameCardIdNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GameCardIdNe(gameCardId uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("game_card_id != ?", gameCardId))
}

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) GetUpdater() ShareCardGameVmUpdater {
	return NewShareCardGameVmUpdater(qs.db)
}

// HoldCardCountEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountEq(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count = ?", holdCardCount))
}

// HoldCardCountGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountGt(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count > ?", holdCardCount))
}

// HoldCardCountGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountGte(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count >= ?", holdCardCount))
}

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

// HoldCardCountLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountLt(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count < ?", holdCardCount))
}

// HoldCardCountLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountLte(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count <= ?", holdCardCount))
}

// HoldCardCountNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) HoldCardCountNe(holdCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("hold_card_count != ?", holdCardCount))
}

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

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) IDIn(ID ...uint32) ShareCardGameVmQuerySet {
	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 ShareCardGameVmQuerySet) IDLt(ID uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) IDNotIn(ID ...uint32) ShareCardGameVmQuerySet {
	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 ShareCardGameVmQuerySet) Limit(limit int) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

// OrderAscByCardProfit is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByCardProfit() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("card_profit ASC"))
}

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

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

// OrderAscByGameCardId is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByGameCardId() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("game_card_id ASC"))
}

// OrderAscByHoldCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByHoldCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("hold_card_count ASC"))
}

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

// OrderAscByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByProvideDate() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("provide_date ASC"))
}

// OrderAscByProvideVm is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByProvideVm() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("provide_vm ASC"))
}

// OrderAscByStockCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByStockCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("stock_card_count ASC"))
}

// OrderAscByTotalCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByTotalCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("total_card_count ASC"))
}

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

// OrderAscByVm is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderAscByVm() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("vm ASC"))
}

// OrderDescByCardProfit is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByCardProfit() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("card_profit DESC"))
}

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

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

// OrderDescByGameCardId is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByGameCardId() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("game_card_id DESC"))
}

// OrderDescByHoldCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByHoldCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("hold_card_count DESC"))
}

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

// OrderDescByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByProvideDate() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("provide_date DESC"))
}

// OrderDescByProvideVm is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByProvideVm() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("provide_vm DESC"))
}

// OrderDescByStockCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByStockCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("stock_card_count DESC"))
}

// OrderDescByTotalCardCount is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByTotalCardCount() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("total_card_count DESC"))
}

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

// OrderDescByVm is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) OrderDescByVm() ShareCardGameVmQuerySet {
	return qs.w(qs.db.Order("vm DESC"))
}

// ProvideDateEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateEq(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date = ?", provideDate))
}

// ProvideDateGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateGt(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date > ?", provideDate))
}

// ProvideDateGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateGte(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date >= ?", provideDate))
}

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

// ProvideDateLike is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateLike(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date LIKE ?", provideDate))
}

// ProvideDateLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateLt(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date < ?", provideDate))
}

// ProvideDateLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateLte(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date <= ?", provideDate))
}

// ProvideDateNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateNe(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date != ?", provideDate))
}

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

// ProvideDateNotlike is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideDateNotlike(provideDate string) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_date NOT LIKE ?", provideDate))
}

// ProvideVmEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmEq(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm = ?", provideVm))
}

// ProvideVmGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmGt(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm > ?", provideVm))
}

// ProvideVmGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmGte(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm >= ?", provideVm))
}

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

// ProvideVmLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmLt(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm < ?", provideVm))
}

// ProvideVmLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmLte(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm <= ?", provideVm))
}

// ProvideVmNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) ProvideVmNe(provideVm uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("provide_vm != ?", provideVm))
}

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

// StockCardCountEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountEq(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count = ?", stockCardCount))
}

// StockCardCountGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountGt(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count > ?", stockCardCount))
}

// StockCardCountGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountGte(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count >= ?", stockCardCount))
}

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

// StockCardCountLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountLt(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count < ?", stockCardCount))
}

// StockCardCountLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountLte(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count <= ?", stockCardCount))
}

// StockCardCountNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) StockCardCountNe(stockCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("stock_card_count != ?", stockCardCount))
}

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

// TotalCardCountEq is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountEq(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count = ?", totalCardCount))
}

// TotalCardCountGt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountGt(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count > ?", totalCardCount))
}

// TotalCardCountGte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountGte(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count >= ?", totalCardCount))
}

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

// TotalCardCountLt is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountLt(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count < ?", totalCardCount))
}

// TotalCardCountLte is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountLte(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count <= ?", totalCardCount))
}

// TotalCardCountNe is an autogenerated method
// nolint: dupl
func (qs ShareCardGameVmQuerySet) TotalCardCountNe(totalCardCount uint32) ShareCardGameVmQuerySet {
	return qs.w(qs.db.Where("total_card_count != ?", totalCardCount))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SetCardProfit is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetCardProfit(cardProfit uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.CardProfit)] = cardProfit
	return u
}

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

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

// SetGameCardId is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetGameCardId(gameCardId uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.GameCardId)] = gameCardId
	return u
}

// SetHoldCardCount is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetHoldCardCount(holdCardCount uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.HoldCardCount)] = holdCardCount
	return u
}

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

// SetProvideDate is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetProvideDate(provideDate string) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.ProvideDate)] = provideDate
	return u
}

// SetProvideVm is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetProvideVm(provideVm uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.ProvideVm)] = provideVm
	return u
}

// SetStockCardCount is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetStockCardCount(stockCardCount uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.StockCardCount)] = stockCardCount
	return u
}

// SetTotalCardCount is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetTotalCardCount(totalCardCount uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.TotalCardCount)] = totalCardCount
	return u
}

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

// SetVm is an autogenerated method
// nolint: dupl
func (u ShareCardGameVmUpdater) SetVm(vm uint32) ShareCardGameVmUpdater {
	u.fields[string(ShareCardGameVmDBSchema.Vm)] = vm
	return u
}

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

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

// ===== END of query set ShareCardGameVmQuerySet

// ===== BEGIN of ShareCardGameVm modifiers

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

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

// ShareCardGameVmDBSchema stores db field names of ShareCardGameVm
var ShareCardGameVmDBSchema = struct {
	ID             ShareCardGameVmDBSchemaField
	CreatedAt      ShareCardGameVmDBSchemaField
	UpdatedAt      ShareCardGameVmDBSchemaField
	DeletedAt      ShareCardGameVmDBSchemaField
	GameCardId     ShareCardGameVmDBSchemaField
	HoldCardCount  ShareCardGameVmDBSchemaField
	StockCardCount ShareCardGameVmDBSchemaField
	TotalCardCount ShareCardGameVmDBSchemaField
	CardProfit     ShareCardGameVmDBSchemaField
	Vm             ShareCardGameVmDBSchemaField
	ProvideVm      ShareCardGameVmDBSchemaField
	ProvideDate    ShareCardGameVmDBSchemaField
}{

	ID:             ShareCardGameVmDBSchemaField("id"),
	CreatedAt:      ShareCardGameVmDBSchemaField("created_at"),
	UpdatedAt:      ShareCardGameVmDBSchemaField("updated_at"),
	DeletedAt:      ShareCardGameVmDBSchemaField("deleted_at"),
	GameCardId:     ShareCardGameVmDBSchemaField("game_card_id"),
	HoldCardCount:  ShareCardGameVmDBSchemaField("hold_card_count"),
	StockCardCount: ShareCardGameVmDBSchemaField("stock_card_count"),
	TotalCardCount: ShareCardGameVmDBSchemaField("total_card_count"),
	CardProfit:     ShareCardGameVmDBSchemaField("card_profit"),
	Vm:             ShareCardGameVmDBSchemaField("vm"),
	ProvideVm:      ShareCardGameVmDBSchemaField("provide_vm"),
	ProvideDate:    ShareCardGameVmDBSchemaField("provide_date"),
}

// Update updates ShareCardGameVm fields by primary key
// nolint: dupl
func (o *ShareCardGameVm) Update(db *gorm.DB, fields ...ShareCardGameVmDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":               o.ID,
		"created_at":       o.CreatedAt,
		"updated_at":       o.UpdatedAt,
		"deleted_at":       o.DeletedAt,
		"game_card_id":     o.GameCardId,
		"hold_card_count":  o.HoldCardCount,
		"stock_card_count": o.StockCardCount,
		"total_card_count": o.TotalCardCount,
		"card_profit":      o.CardProfit,
		"vm":               o.Vm,
		"provide_vm":       o.ProvideVm,
		"provide_date":     o.ProvideDate,
	}
	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 ShareCardGameVm %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of ShareCardGameVm modifiers

// ===== BEGIN of query set ShareCardVmRecordQuerySet

// ShareCardVmRecordQuerySet is an queryset type for ShareCardVmRecord
type ShareCardVmRecordQuerySet struct {
	db *gorm.DB
}

// NewShareCardVmRecordQuerySet constructs new ShareCardVmRecordQuerySet
func NewShareCardVmRecordQuerySet(db *gorm.DB) ShareCardVmRecordQuerySet {
	return ShareCardVmRecordQuerySet{
		db: db.Model(&ShareCardVmRecord{}),
	}
}

func (qs ShareCardVmRecordQuerySet) w(db *gorm.DB) ShareCardVmRecordQuerySet {
	return NewShareCardVmRecordQuerySet(db)
}

func (qs ShareCardVmRecordQuerySet) Select(fields ...ShareCardVmRecordDBSchemaField) ShareCardVmRecordQuerySet {
	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 *ShareCardVmRecord) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) GetUpdater() ShareCardVmRecordUpdater {
	return NewShareCardVmRecordUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) IDIn(ID ...uint32) ShareCardVmRecordQuerySet {
	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 ShareCardVmRecordQuerySet) IDLt(ID uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) IDNotIn(ID ...uint32) ShareCardVmRecordQuerySet {
	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 ShareCardVmRecordQuerySet) Limit(limit int) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

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

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

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

// OrderAscByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderAscByProvideDate() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("provide_date ASC"))
}

// OrderAscByProvideVm is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderAscByProvideVm() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("provide_vm ASC"))
}

// OrderAscByTotalVm is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderAscByTotalVm() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("total_vm ASC"))
}

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

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

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

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

// OrderDescByProvideDate is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderDescByProvideDate() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("provide_date DESC"))
}

// OrderDescByProvideVm is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderDescByProvideVm() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("provide_vm DESC"))
}

// OrderDescByTotalVm is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) OrderDescByTotalVm() ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Order("total_vm DESC"))
}

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

// ProvideDateEq is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateEq(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date = ?", provideDate))
}

// ProvideDateGt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateGt(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date > ?", provideDate))
}

// ProvideDateGte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateGte(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date >= ?", provideDate))
}

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

// ProvideDateLike is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateLike(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date LIKE ?", provideDate))
}

// ProvideDateLt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateLt(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date < ?", provideDate))
}

// ProvideDateLte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateLte(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date <= ?", provideDate))
}

// ProvideDateNe is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateNe(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date != ?", provideDate))
}

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

// ProvideDateNotlike is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideDateNotlike(provideDate string) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_date NOT LIKE ?", provideDate))
}

// ProvideVmEq is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmEq(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm = ?", provideVm))
}

// ProvideVmGt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmGt(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm > ?", provideVm))
}

// ProvideVmGte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmGte(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm >= ?", provideVm))
}

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

// ProvideVmLt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmLt(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm < ?", provideVm))
}

// ProvideVmLte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmLte(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm <= ?", provideVm))
}

// ProvideVmNe is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) ProvideVmNe(provideVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("provide_vm != ?", provideVm))
}

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

// TotalVmEq is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmEq(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm = ?", totalVm))
}

// TotalVmGt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmGt(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm > ?", totalVm))
}

// TotalVmGte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmGte(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm >= ?", totalVm))
}

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

// TotalVmLt is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmLt(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm < ?", totalVm))
}

// TotalVmLte is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmLte(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm <= ?", totalVm))
}

// TotalVmNe is an autogenerated method
// nolint: dupl
func (qs ShareCardVmRecordQuerySet) TotalVmNe(totalVm uint32) ShareCardVmRecordQuerySet {
	return qs.w(qs.db.Where("total_vm != ?", totalVm))
}

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

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

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

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

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

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

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

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

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

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

// SetProvideDate is an autogenerated method
// nolint: dupl
func (u ShareCardVmRecordUpdater) SetProvideDate(provideDate string) ShareCardVmRecordUpdater {
	u.fields[string(ShareCardVmRecordDBSchema.ProvideDate)] = provideDate
	return u
}

// SetProvideVm is an autogenerated method
// nolint: dupl
func (u ShareCardVmRecordUpdater) SetProvideVm(provideVm uint32) ShareCardVmRecordUpdater {
	u.fields[string(ShareCardVmRecordDBSchema.ProvideVm)] = provideVm
	return u
}

// SetTotalVm is an autogenerated method
// nolint: dupl
func (u ShareCardVmRecordUpdater) SetTotalVm(totalVm uint32) ShareCardVmRecordUpdater {
	u.fields[string(ShareCardVmRecordDBSchema.TotalVm)] = totalVm
	return u
}

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

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

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

// ===== END of query set ShareCardVmRecordQuerySet

// ===== BEGIN of ShareCardVmRecord modifiers

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

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

// ShareCardVmRecordDBSchema stores db field names of ShareCardVmRecord
var ShareCardVmRecordDBSchema = struct {
	ID          ShareCardVmRecordDBSchemaField
	CreatedAt   ShareCardVmRecordDBSchemaField
	UpdatedAt   ShareCardVmRecordDBSchemaField
	DeletedAt   ShareCardVmRecordDBSchemaField
	TotalVm     ShareCardVmRecordDBSchemaField
	ProvideVm   ShareCardVmRecordDBSchemaField
	ProvideDate ShareCardVmRecordDBSchemaField
}{

	ID:          ShareCardVmRecordDBSchemaField("id"),
	CreatedAt:   ShareCardVmRecordDBSchemaField("created_at"),
	UpdatedAt:   ShareCardVmRecordDBSchemaField("updated_at"),
	DeletedAt:   ShareCardVmRecordDBSchemaField("deleted_at"),
	TotalVm:     ShareCardVmRecordDBSchemaField("total_vm"),
	ProvideVm:   ShareCardVmRecordDBSchemaField("provide_vm"),
	ProvideDate: ShareCardVmRecordDBSchemaField("provide_date"),
}

// Update updates ShareCardVmRecord fields by primary key
// nolint: dupl
func (o *ShareCardVmRecord) Update(db *gorm.DB, fields ...ShareCardVmRecordDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":           o.ID,
		"created_at":   o.CreatedAt,
		"updated_at":   o.UpdatedAt,
		"deleted_at":   o.DeletedAt,
		"total_vm":     o.TotalVm,
		"provide_vm":   o.ProvideVm,
		"provide_date": o.ProvideDate,
	}
	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 ShareCardVmRecord %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of ShareCardVmRecord modifiers

// ===== BEGIN of query set UserShareCardBillQuerySet

// UserShareCardBillQuerySet is an queryset type for UserShareCardBill
type UserShareCardBillQuerySet struct {
	db *gorm.DB
}

// NewUserShareCardBillQuerySet constructs new UserShareCardBillQuerySet
func NewUserShareCardBillQuerySet(db *gorm.DB) UserShareCardBillQuerySet {
	return UserShareCardBillQuerySet{
		db: db.Model(&UserShareCardBill{}),
	}
}

func (qs UserShareCardBillQuerySet) w(db *gorm.DB) UserShareCardBillQuerySet {
	return NewUserShareCardBillQuerySet(db)
}

func (qs UserShareCardBillQuerySet) Select(fields ...UserShareCardBillDBSchemaField) UserShareCardBillQuerySet {
	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 *UserShareCardBill) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

// BillSnEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnEq(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn = ?", billSn))
}

// BillSnGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnGt(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn > ?", billSn))
}

// BillSnGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnGte(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn >= ?", billSn))
}

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

// BillSnLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnLike(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn LIKE ?", billSn))
}

// BillSnLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnLt(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn < ?", billSn))
}

// BillSnLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnLte(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn <= ?", billSn))
}

// BillSnNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnNe(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn != ?", billSn))
}

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

// BillSnNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) BillSnNotlike(billSn string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("bill_sn NOT LIKE ?", billSn))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ExpressCompanyEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyEq(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company = ?", expressCompany))
}

// ExpressCompanyGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyGt(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company > ?", expressCompany))
}

// ExpressCompanyGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyGte(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company >= ?", expressCompany))
}

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

// ExpressCompanyLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyLike(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company LIKE ?", expressCompany))
}

// ExpressCompanyLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyLt(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company < ?", expressCompany))
}

// ExpressCompanyLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyLte(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company <= ?", expressCompany))
}

// ExpressCompanyNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNe(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company != ?", expressCompany))
}

// ExpressCompanyNoEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoEq(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no = ?", expressCompanyNo))
}

// ExpressCompanyNoGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoGt(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no > ?", expressCompanyNo))
}

// ExpressCompanyNoGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoGte(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no >= ?", expressCompanyNo))
}

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

// ExpressCompanyNoLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoLike(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no LIKE ?", expressCompanyNo))
}

// ExpressCompanyNoLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoLt(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no < ?", expressCompanyNo))
}

// ExpressCompanyNoLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoLte(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no <= ?", expressCompanyNo))
}

// ExpressCompanyNoNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoNe(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no != ?", expressCompanyNo))
}

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

// ExpressCompanyNoNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNoNotlike(expressCompanyNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company_no NOT LIKE ?", expressCompanyNo))
}

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

// ExpressCompanyNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressCompanyNotlike(expressCompany string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_company NOT LIKE ?", expressCompany))
}

// ExpressNoEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoEq(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no = ?", expressNo))
}

// ExpressNoGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoGt(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no > ?", expressNo))
}

// ExpressNoGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoGte(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no >= ?", expressNo))
}

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

// ExpressNoLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoLike(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no LIKE ?", expressNo))
}

// ExpressNoLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoLt(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no < ?", expressNo))
}

// ExpressNoLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoLte(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no <= ?", expressNo))
}

// ExpressNoNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoNe(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no != ?", expressNo))
}

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

// ExpressNoNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) ExpressNoNotlike(expressNo string) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("express_no NOT LIKE ?", expressNo))
}

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) GetUpdater() UserShareCardBillUpdater {
	return NewUserShareCardBillUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) IDIn(ID ...uint32) UserShareCardBillQuerySet {
	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 UserShareCardBillQuerySet) IDLt(ID uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) IDNotIn(ID ...uint32) UserShareCardBillQuerySet {
	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 UserShareCardBillQuerySet) Limit(limit int) UserShareCardBillQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

// OrderAscByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByBillSn() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("bill_sn ASC"))
}

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

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

// OrderAscByExpressCompany is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByExpressCompany() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_company ASC"))
}

// OrderAscByExpressCompanyNo is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByExpressCompanyNo() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_company_no ASC"))
}

// OrderAscByExpressNo is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByExpressNo() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_no ASC"))
}

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

// OrderAscByRemark is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByRemark() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("remark ASC"))
}

// OrderAscByRetrieveTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByRetrieveTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("retrieve_time ASC"))
}

// OrderAscBySendCardTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscBySendCardTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("send_card_time ASC"))
}

// OrderAscBySendCardType is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscBySendCardType() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("send_card_type ASC"))
}

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

// OrderAscByStockRemovalTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByStockRemovalTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("stock_removal_time ASC"))
}

// OrderAscByStockTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByStockTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("stock_time ASC"))
}

// OrderAscByStoreId is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderAscByStoreId() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("store_id ASC"))
}

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

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

// OrderDescByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByBillSn() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("bill_sn DESC"))
}

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

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

// OrderDescByExpressCompany is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByExpressCompany() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_company DESC"))
}

// OrderDescByExpressCompanyNo is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByExpressCompanyNo() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_company_no DESC"))
}

// OrderDescByExpressNo is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByExpressNo() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("express_no DESC"))
}

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

// OrderDescByRemark is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByRemark() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("remark DESC"))
}

// OrderDescByRetrieveTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByRetrieveTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("retrieve_time DESC"))
}

// OrderDescBySendCardTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescBySendCardTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("send_card_time DESC"))
}

// OrderDescBySendCardType is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescBySendCardType() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("send_card_type DESC"))
}

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

// OrderDescByStockRemovalTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByStockRemovalTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("stock_removal_time DESC"))
}

// OrderDescByStockTime is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByStockTime() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("stock_time DESC"))
}

// OrderDescByStoreId is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) OrderDescByStoreId() UserShareCardBillQuerySet {
	return qs.w(qs.db.Order("store_id DESC"))
}

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

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

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

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

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

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

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

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

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

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

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

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

// RetrieveTimeEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeEq(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time = ?", retrieveTime))
}

// RetrieveTimeGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeGt(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time > ?", retrieveTime))
}

// RetrieveTimeGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeGte(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time >= ?", retrieveTime))
}

// RetrieveTimeLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeLt(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time < ?", retrieveTime))
}

// RetrieveTimeLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeLte(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time <= ?", retrieveTime))
}

// RetrieveTimeNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) RetrieveTimeNe(retrieveTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("retrieve_time != ?", retrieveTime))
}

// SendCardTimeEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeEq(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time = ?", sendCardTime))
}

// SendCardTimeGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeGt(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time > ?", sendCardTime))
}

// SendCardTimeGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeGte(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time >= ?", sendCardTime))
}

// SendCardTimeLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeLt(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time < ?", sendCardTime))
}

// SendCardTimeLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeLte(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time <= ?", sendCardTime))
}

// SendCardTimeNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTimeNe(sendCardTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_time != ?", sendCardTime))
}

// SendCardTypeEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeEq(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type = ?", sendCardType))
}

// SendCardTypeGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeGt(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type > ?", sendCardType))
}

// SendCardTypeGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeGte(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type >= ?", sendCardType))
}

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

// SendCardTypeLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeLt(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type < ?", sendCardType))
}

// SendCardTypeLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeLte(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type <= ?", sendCardType))
}

// SendCardTypeNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) SendCardTypeNe(sendCardType uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("send_card_type != ?", sendCardType))
}

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

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

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

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

// StateIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StateIn(state ...string) UserShareCardBillQuerySet {
	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))
}

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

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

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

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

// StateNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StateNotIn(state ...string) UserShareCardBillQuerySet {
	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))
}

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

// StockRemovalTimeEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeEq(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time = ?", stockRemovalTime))
}

// StockRemovalTimeGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeGt(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time > ?", stockRemovalTime))
}

// StockRemovalTimeGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeGte(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time >= ?", stockRemovalTime))
}

// StockRemovalTimeLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeLt(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time < ?", stockRemovalTime))
}

// StockRemovalTimeLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeLte(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time <= ?", stockRemovalTime))
}

// StockRemovalTimeNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockRemovalTimeNe(stockRemovalTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_removal_time != ?", stockRemovalTime))
}

// StockTimeEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeEq(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time = ?", stockTime))
}

// StockTimeGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeGt(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time > ?", stockTime))
}

// StockTimeGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeGte(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time >= ?", stockTime))
}

// StockTimeLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeLt(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time < ?", stockTime))
}

// StockTimeLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeLte(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time <= ?", stockTime))
}

// StockTimeNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StockTimeNe(stockTime time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("stock_time != ?", stockTime))
}

// StoreIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdEq(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id = ?", storeId))
}

// StoreIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdGt(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id > ?", storeId))
}

// StoreIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdGte(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id >= ?", storeId))
}

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

// StoreIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdLt(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id < ?", storeId))
}

// StoreIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdLte(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id <= ?", storeId))
}

// StoreIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) StoreIdNe(storeId uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("store_id != ?", storeId))
}

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

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

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

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

// UidIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) UidIn(uid ...uint32) UserShareCardBillQuerySet {
	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 UserShareCardBillQuerySet) UidLt(uid uint32) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

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

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

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardBillQuerySet) UidNotIn(uid ...uint32) UserShareCardBillQuerySet {
	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 UserShareCardBillQuerySet) UpdatedAtEq(updatedAt time.Time) UserShareCardBillQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

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

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

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

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

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

// SetBillSn is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetBillSn(billSn string) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.BillSn)] = billSn
	return u
}

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

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

// SetExpressCompany is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetExpressCompany(expressCompany string) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.ExpressCompany)] = expressCompany
	return u
}

// SetExpressCompanyNo is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetExpressCompanyNo(expressCompanyNo string) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.ExpressCompanyNo)] = expressCompanyNo
	return u
}

// SetExpressNo is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetExpressNo(expressNo string) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.ExpressNo)] = expressNo
	return u
}

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

// SetRemark is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetRemark(remark string) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.Remark)] = remark
	return u
}

// SetRetrieveTime is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetRetrieveTime(retrieveTime time.Time) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.RetrieveTime)] = retrieveTime
	return u
}

// SetSendCardTime is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetSendCardTime(sendCardTime time.Time) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.SendCardTime)] = sendCardTime
	return u
}

// SetSendCardType is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetSendCardType(sendCardType uint32) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.SendCardType)] = sendCardType
	return u
}

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

// SetStockRemovalTime is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetStockRemovalTime(stockRemovalTime time.Time) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.StockRemovalTime)] = stockRemovalTime
	return u
}

// SetStockTime is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetStockTime(stockTime time.Time) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.StockTime)] = stockTime
	return u
}

// SetStoreId is an autogenerated method
// nolint: dupl
func (u UserShareCardBillUpdater) SetStoreId(storeId uint32) UserShareCardBillUpdater {
	u.fields[string(UserShareCardBillDBSchema.StoreId)] = storeId
	return u
}

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

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

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

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

// ===== END of query set UserShareCardBillQuerySet

// ===== BEGIN of UserShareCardBill modifiers

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

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

// UserShareCardBillDBSchema stores db field names of UserShareCardBill
var UserShareCardBillDBSchema = struct {
	ID               UserShareCardBillDBSchemaField
	CreatedAt        UserShareCardBillDBSchemaField
	UpdatedAt        UserShareCardBillDBSchemaField
	DeletedAt        UserShareCardBillDBSchemaField
	Uid              UserShareCardBillDBSchemaField
	BillSn           UserShareCardBillDBSchemaField
	State            UserShareCardBillDBSchemaField
	SendCardType     UserShareCardBillDBSchemaField
	StoreId          UserShareCardBillDBSchemaField
	ExpressCompany   UserShareCardBillDBSchemaField
	ExpressCompanyNo UserShareCardBillDBSchemaField
	ExpressNo        UserShareCardBillDBSchemaField
	SendCardTime     UserShareCardBillDBSchemaField
	StockTime        UserShareCardBillDBSchemaField
	RetrieveTime     UserShareCardBillDBSchemaField
	StockRemovalTime UserShareCardBillDBSchemaField
	Remark           UserShareCardBillDBSchemaField
}{

	ID:               UserShareCardBillDBSchemaField("id"),
	CreatedAt:        UserShareCardBillDBSchemaField("created_at"),
	UpdatedAt:        UserShareCardBillDBSchemaField("updated_at"),
	DeletedAt:        UserShareCardBillDBSchemaField("deleted_at"),
	Uid:              UserShareCardBillDBSchemaField("uid"),
	BillSn:           UserShareCardBillDBSchemaField("bill_sn"),
	State:            UserShareCardBillDBSchemaField("state"),
	SendCardType:     UserShareCardBillDBSchemaField("send_card_type"),
	StoreId:          UserShareCardBillDBSchemaField("store_id"),
	ExpressCompany:   UserShareCardBillDBSchemaField("express_company"),
	ExpressCompanyNo: UserShareCardBillDBSchemaField("express_company_no"),
	ExpressNo:        UserShareCardBillDBSchemaField("express_no"),
	SendCardTime:     UserShareCardBillDBSchemaField("send_card_time"),
	StockTime:        UserShareCardBillDBSchemaField("stock_time"),
	RetrieveTime:     UserShareCardBillDBSchemaField("retrieve_time"),
	StockRemovalTime: UserShareCardBillDBSchemaField("stock_removal_time"),
	Remark:           UserShareCardBillDBSchemaField("remark"),
}

// Update updates UserShareCardBill fields by primary key
// nolint: dupl
func (o *UserShareCardBill) Update(db *gorm.DB, fields ...UserShareCardBillDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":                 o.ID,
		"created_at":         o.CreatedAt,
		"updated_at":         o.UpdatedAt,
		"deleted_at":         o.DeletedAt,
		"uid":                o.Uid,
		"bill_sn":            o.BillSn,
		"state":              o.State,
		"send_card_type":     o.SendCardType,
		"store_id":           o.StoreId,
		"express_company":    o.ExpressCompany,
		"express_company_no": o.ExpressCompanyNo,
		"express_no":         o.ExpressNo,
		"send_card_time":     o.SendCardTime,
		"stock_time":         o.StockTime,
		"retrieve_time":      o.RetrieveTime,
		"stock_removal_time": o.StockRemovalTime,
		"remark":             o.Remark,
	}
	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 UserShareCardBill %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of UserShareCardBill modifiers

// ===== BEGIN of query set UserShareCardQuerySet

// UserShareCardQuerySet is an queryset type for UserShareCard
type UserShareCardQuerySet struct {
	db *gorm.DB
}

// NewUserShareCardQuerySet constructs new UserShareCardQuerySet
func NewUserShareCardQuerySet(db *gorm.DB) UserShareCardQuerySet {
	return UserShareCardQuerySet{
		db: db.Model(&UserShareCard{}),
	}
}

func (qs UserShareCardQuerySet) w(db *gorm.DB) UserShareCardQuerySet {
	return NewUserShareCardQuerySet(db)
}

func (qs UserShareCardQuerySet) Select(fields ...UserShareCardDBSchemaField) UserShareCardQuerySet {
	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 *UserShareCard) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

// BillSnEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnEq(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn = ?", billSn))
}

// BillSnGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnGt(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn > ?", billSn))
}

// BillSnGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnGte(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn >= ?", billSn))
}

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

// BillSnLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnLike(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn LIKE ?", billSn))
}

// BillSnLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnLt(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn < ?", billSn))
}

// BillSnLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnLte(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn <= ?", billSn))
}

// BillSnNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnNe(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn != ?", billSn))
}

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

// BillSnNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) BillSnNotlike(billSn string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("bill_sn NOT LIKE ?", billSn))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GameCardGoodsIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdEq(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id = ?", gameCardGoodsId))
}

// GameCardGoodsIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdGt(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id > ?", gameCardGoodsId))
}

// GameCardGoodsIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdGte(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id >= ?", gameCardGoodsId))
}

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

// GameCardGoodsIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdLt(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id < ?", gameCardGoodsId))
}

// GameCardGoodsIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdLte(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id <= ?", gameCardGoodsId))
}

// GameCardGoodsIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardGoodsIdNe(gameCardGoodsId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id != ?", gameCardGoodsId))
}

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

// GameCardIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdEq(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id = ?", gameCardId))
}

// GameCardIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdGt(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id > ?", gameCardId))
}

// GameCardIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdGte(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id >= ?", gameCardId))
}

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

// GameCardIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdLt(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id < ?", gameCardId))
}

// GameCardIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdLte(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id <= ?", gameCardId))
}

// GameCardIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GameCardIdNe(gameCardId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("game_card_id != ?", gameCardId))
}

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) GetUpdater() UserShareCardUpdater {
	return NewUserShareCardUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) IDIn(ID ...uint32) UserShareCardQuerySet {
	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 UserShareCardQuerySet) IDLt(ID uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) IDNotIn(ID ...uint32) UserShareCardQuerySet {
	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 UserShareCardQuerySet) Limit(limit int) UserShareCardQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

// OrderAscByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByBillSn() UserShareCardQuerySet {
	return qs.w(qs.db.Order("bill_sn ASC"))
}

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

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

// OrderAscByGameCardGoodsId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByGameCardGoodsId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("game_card_goods_id ASC"))
}

// OrderAscByGameCardId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByGameCardId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("game_card_id ASC"))
}

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

// OrderAscBySerialNumber is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscBySerialNumber() UserShareCardQuerySet {
	return qs.w(qs.db.Order("serial_number ASC"))
}

// OrderAscByShareCardBillGameId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByShareCardBillGameId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("share_card_bill_game_id ASC"))
}

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

// OrderAscByStoreId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByStoreId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("store_id ASC"))
}

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

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

// OrderAscByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderAscByUserShareCardBillId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id ASC"))
}

// OrderDescByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByBillSn() UserShareCardQuerySet {
	return qs.w(qs.db.Order("bill_sn DESC"))
}

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

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

// OrderDescByGameCardGoodsId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByGameCardGoodsId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("game_card_goods_id DESC"))
}

// OrderDescByGameCardId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByGameCardId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("game_card_id DESC"))
}

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

// OrderDescBySerialNumber is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescBySerialNumber() UserShareCardQuerySet {
	return qs.w(qs.db.Order("serial_number DESC"))
}

// OrderDescByShareCardBillGameId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByShareCardBillGameId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("share_card_bill_game_id DESC"))
}

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

// OrderDescByStoreId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByStoreId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("store_id DESC"))
}

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

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

// OrderDescByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) OrderDescByUserShareCardBillId() UserShareCardQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id DESC"))
}

// SerialNumberEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberEq(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number = ?", serialNumber))
}

// SerialNumberGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberGt(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number > ?", serialNumber))
}

// SerialNumberGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberGte(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number >= ?", serialNumber))
}

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

// SerialNumberLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberLike(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number LIKE ?", serialNumber))
}

// SerialNumberLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberLt(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number < ?", serialNumber))
}

// SerialNumberLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberLte(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number <= ?", serialNumber))
}

// SerialNumberNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberNe(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number != ?", serialNumber))
}

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

// SerialNumberNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) SerialNumberNotlike(serialNumber string) UserShareCardQuerySet {
	return qs.w(qs.db.Where("serial_number NOT LIKE ?", serialNumber))
}

// ShareCardBillGameIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdEq(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id = ?", shareCardBillGameId))
}

// ShareCardBillGameIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdGt(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id > ?", shareCardBillGameId))
}

// ShareCardBillGameIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdGte(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id >= ?", shareCardBillGameId))
}

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

// ShareCardBillGameIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdLt(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id < ?", shareCardBillGameId))
}

// ShareCardBillGameIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdLte(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id <= ?", shareCardBillGameId))
}

// ShareCardBillGameIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) ShareCardBillGameIdNe(shareCardBillGameId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("share_card_bill_game_id != ?", shareCardBillGameId))
}

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

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

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

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

// StateIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StateIn(state ...string) UserShareCardQuerySet {
	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))
}

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

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

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

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

// StateNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StateNotIn(state ...string) UserShareCardQuerySet {
	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))
}

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

// StoreIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdEq(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id = ?", storeId))
}

// StoreIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdGt(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id > ?", storeId))
}

// StoreIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdGte(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id >= ?", storeId))
}

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

// StoreIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdLt(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id < ?", storeId))
}

// StoreIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdLte(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id <= ?", storeId))
}

// StoreIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) StoreIdNe(storeId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("store_id != ?", storeId))
}

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

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

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

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

// UidIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UidIn(uid ...uint32) UserShareCardQuerySet {
	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 UserShareCardQuerySet) UidLt(uid uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

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

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

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UidNotIn(uid ...uint32) UserShareCardQuerySet {
	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 UserShareCardQuerySet) UpdatedAtEq(updatedAt time.Time) UserShareCardQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

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

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

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

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

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

// UserShareCardBillIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdEq(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id = ?", userShareCardBillId))
}

// UserShareCardBillIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdGt(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id > ?", userShareCardBillId))
}

// UserShareCardBillIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdGte(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id >= ?", userShareCardBillId))
}

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

// UserShareCardBillIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdLt(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id < ?", userShareCardBillId))
}

// UserShareCardBillIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdLte(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id <= ?", userShareCardBillId))
}

// UserShareCardBillIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardQuerySet) UserShareCardBillIdNe(userShareCardBillId uint32) UserShareCardQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id != ?", userShareCardBillId))
}

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

// SetBillSn is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetBillSn(billSn string) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.BillSn)] = billSn
	return u
}

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

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

// SetGameCardGoodsId is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetGameCardGoodsId(gameCardGoodsId uint32) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.GameCardGoodsId)] = gameCardGoodsId
	return u
}

// SetGameCardId is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetGameCardId(gameCardId uint32) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.GameCardId)] = gameCardId
	return u
}

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

// SetSerialNumber is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetSerialNumber(serialNumber string) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.SerialNumber)] = serialNumber
	return u
}

// SetShareCardBillGameId is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetShareCardBillGameId(shareCardBillGameId uint32) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.ShareCardBillGameId)] = shareCardBillGameId
	return u
}

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

// SetStoreId is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetStoreId(storeId uint32) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.StoreId)] = storeId
	return u
}

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

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

// SetUserShareCardBillId is an autogenerated method
// nolint: dupl
func (u UserShareCardUpdater) SetUserShareCardBillId(userShareCardBillId uint32) UserShareCardUpdater {
	u.fields[string(UserShareCardDBSchema.UserShareCardBillId)] = userShareCardBillId
	return u
}

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

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

// ===== END of query set UserShareCardQuerySet

// ===== BEGIN of UserShareCard modifiers

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

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

// UserShareCardDBSchema stores db field names of UserShareCard
var UserShareCardDBSchema = struct {
	ID                  UserShareCardDBSchemaField
	CreatedAt           UserShareCardDBSchemaField
	UpdatedAt           UserShareCardDBSchemaField
	DeletedAt           UserShareCardDBSchemaField
	Uid                 UserShareCardDBSchemaField
	SerialNumber        UserShareCardDBSchemaField
	BillSn              UserShareCardDBSchemaField
	GameCardId          UserShareCardDBSchemaField
	State               UserShareCardDBSchemaField
	GameCardGoodsId     UserShareCardDBSchemaField
	UserShareCardBillId UserShareCardDBSchemaField
	ShareCardBillGameId UserShareCardDBSchemaField
	StoreId             UserShareCardDBSchemaField
}{

	ID:                  UserShareCardDBSchemaField("id"),
	CreatedAt:           UserShareCardDBSchemaField("created_at"),
	UpdatedAt:           UserShareCardDBSchemaField("updated_at"),
	DeletedAt:           UserShareCardDBSchemaField("deleted_at"),
	Uid:                 UserShareCardDBSchemaField("uid"),
	SerialNumber:        UserShareCardDBSchemaField("serial_number"),
	BillSn:              UserShareCardDBSchemaField("bill_sn"),
	GameCardId:          UserShareCardDBSchemaField("game_card_id"),
	State:               UserShareCardDBSchemaField("state"),
	GameCardGoodsId:     UserShareCardDBSchemaField("game_card_goods_id"),
	UserShareCardBillId: UserShareCardDBSchemaField("user_share_card_bill_id"),
	ShareCardBillGameId: UserShareCardDBSchemaField("share_card_bill_game_id"),
	StoreId:             UserShareCardDBSchemaField("store_id"),
}

// Update updates UserShareCard fields by primary key
// nolint: dupl
func (o *UserShareCard) Update(db *gorm.DB, fields ...UserShareCardDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":                      o.ID,
		"created_at":              o.CreatedAt,
		"updated_at":              o.UpdatedAt,
		"deleted_at":              o.DeletedAt,
		"uid":                     o.Uid,
		"serial_number":           o.SerialNumber,
		"bill_sn":                 o.BillSn,
		"game_card_id":            o.GameCardId,
		"state":                   o.State,
		"game_card_goods_id":      o.GameCardGoodsId,
		"user_share_card_bill_id": o.UserShareCardBillId,
		"share_card_bill_game_id": o.ShareCardBillGameId,
		"store_id":                o.StoreId,
	}
	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 UserShareCard %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of UserShareCard modifiers

// ===== BEGIN of query set UserShareCardVmQuerySet

// UserShareCardVmQuerySet is an queryset type for UserShareCardVm
type UserShareCardVmQuerySet struct {
	db *gorm.DB
}

// NewUserShareCardVmQuerySet constructs new UserShareCardVmQuerySet
func NewUserShareCardVmQuerySet(db *gorm.DB) UserShareCardVmQuerySet {
	return UserShareCardVmQuerySet{
		db: db.Model(&UserShareCardVm{}),
	}
}

func (qs UserShareCardVmQuerySet) w(db *gorm.DB) UserShareCardVmQuerySet {
	return NewUserShareCardVmQuerySet(db)
}

func (qs UserShareCardVmQuerySet) Select(fields ...UserShareCardVmDBSchemaField) UserShareCardVmQuerySet {
	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 *UserShareCardVm) Create(db *gorm.DB) error {
	return db.Create(o).Error
}

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

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

// BillSnEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnEq(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn = ?", billSn))
}

// BillSnGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnGt(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn > ?", billSn))
}

// BillSnGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnGte(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn >= ?", billSn))
}

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

// BillSnLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnLike(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn LIKE ?", billSn))
}

// BillSnLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnLt(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn < ?", billSn))
}

// BillSnLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnLte(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn <= ?", billSn))
}

// BillSnNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnNe(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn != ?", billSn))
}

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

// BillSnNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) BillSnNotlike(billSn string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("bill_sn NOT LIKE ?", billSn))
}

// CardProfitEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitEq(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit = ?", cardProfit))
}

// CardProfitGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitGt(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit > ?", cardProfit))
}

// CardProfitGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitGte(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit >= ?", cardProfit))
}

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

// CardProfitLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitLt(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit < ?", cardProfit))
}

// CardProfitLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitLte(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit <= ?", cardProfit))
}

// CardProfitNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) CardProfitNe(cardProfit uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("card_profit != ?", cardProfit))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// GameCardGoodsIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdEq(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id = ?", gameCardGoodsId))
}

// GameCardGoodsIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdGt(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id > ?", gameCardGoodsId))
}

// GameCardGoodsIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdGte(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id >= ?", gameCardGoodsId))
}

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

// GameCardGoodsIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdLt(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id < ?", gameCardGoodsId))
}

// GameCardGoodsIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdLte(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id <= ?", gameCardGoodsId))
}

// GameCardGoodsIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardGoodsIdNe(gameCardGoodsId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_goods_id != ?", gameCardGoodsId))
}

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

// GameCardIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdEq(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id = ?", gameCardId))
}

// GameCardIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdGt(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id > ?", gameCardId))
}

// GameCardIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdGte(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id >= ?", gameCardId))
}

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

// GameCardIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdLt(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id < ?", gameCardId))
}

// GameCardIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdLte(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id <= ?", gameCardId))
}

// GameCardIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GameCardIdNe(gameCardId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("game_card_id != ?", gameCardId))
}

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

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

// GetUpdater is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) GetUpdater() UserShareCardVmUpdater {
	return NewUserShareCardVmUpdater(qs.db)
}

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

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

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

// IDIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) IDIn(ID ...uint32) UserShareCardVmQuerySet {
	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 UserShareCardVmQuerySet) IDLt(ID uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}

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

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

// IDNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) IDNotIn(ID ...uint32) UserShareCardVmQuerySet {
	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 UserShareCardVmQuerySet) Limit(limit int) UserShareCardVmQuerySet {
	return qs.w(qs.db.Limit(limit))
}

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

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

// OrderAscByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByBillSn() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("bill_sn ASC"))
}

// OrderAscByCardProfit is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByCardProfit() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("card_profit ASC"))
}

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

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

// OrderAscByGameCardGoodsId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByGameCardGoodsId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("game_card_goods_id ASC"))
}

// OrderAscByGameCardId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByGameCardId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("game_card_id ASC"))
}

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

// OrderAscByProvideDate is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByProvideDate() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("provide_date ASC"))
}

// OrderAscBySerialNumber is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscBySerialNumber() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("serial_number ASC"))
}

// OrderAscByShareCardGameVmId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByShareCardGameVmId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("share_card_game_vm_id ASC"))
}

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

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

// OrderAscByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByUserShareCardBillId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id ASC"))
}

// OrderAscByVm is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderAscByVm() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("vm ASC"))
}

// OrderDescByBillSn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByBillSn() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("bill_sn DESC"))
}

// OrderDescByCardProfit is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByCardProfit() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("card_profit DESC"))
}

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

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

// OrderDescByGameCardGoodsId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByGameCardGoodsId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("game_card_goods_id DESC"))
}

// OrderDescByGameCardId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByGameCardId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("game_card_id DESC"))
}

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

// OrderDescByProvideDate is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByProvideDate() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("provide_date DESC"))
}

// OrderDescBySerialNumber is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescBySerialNumber() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("serial_number DESC"))
}

// OrderDescByShareCardGameVmId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByShareCardGameVmId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("share_card_game_vm_id DESC"))
}

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

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

// OrderDescByUserShareCardBillId is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByUserShareCardBillId() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("user_share_card_bill_id DESC"))
}

// OrderDescByVm is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) OrderDescByVm() UserShareCardVmQuerySet {
	return qs.w(qs.db.Order("vm DESC"))
}

// ProvideDateEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateEq(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date = ?", provideDate))
}

// ProvideDateGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateGt(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date > ?", provideDate))
}

// ProvideDateGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateGte(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date >= ?", provideDate))
}

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

// ProvideDateLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateLike(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date LIKE ?", provideDate))
}

// ProvideDateLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateLt(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date < ?", provideDate))
}

// ProvideDateLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateLte(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date <= ?", provideDate))
}

// ProvideDateNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateNe(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date != ?", provideDate))
}

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

// ProvideDateNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ProvideDateNotlike(provideDate string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("provide_date NOT LIKE ?", provideDate))
}

// SerialNumberEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberEq(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number = ?", serialNumber))
}

// SerialNumberGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberGt(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number > ?", serialNumber))
}

// SerialNumberGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberGte(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number >= ?", serialNumber))
}

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

// SerialNumberLike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberLike(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number LIKE ?", serialNumber))
}

// SerialNumberLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberLt(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number < ?", serialNumber))
}

// SerialNumberLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberLte(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number <= ?", serialNumber))
}

// SerialNumberNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberNe(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number != ?", serialNumber))
}

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

// SerialNumberNotlike is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) SerialNumberNotlike(serialNumber string) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("serial_number NOT LIKE ?", serialNumber))
}

// ShareCardGameVmIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdEq(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id = ?", shareCardGameVmId))
}

// ShareCardGameVmIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdGt(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id > ?", shareCardGameVmId))
}

// ShareCardGameVmIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdGte(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id >= ?", shareCardGameVmId))
}

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

// ShareCardGameVmIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdLt(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id < ?", shareCardGameVmId))
}

// ShareCardGameVmIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdLte(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id <= ?", shareCardGameVmId))
}

// ShareCardGameVmIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) ShareCardGameVmIdNe(shareCardGameVmId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("share_card_game_vm_id != ?", shareCardGameVmId))
}

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

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

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

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

// UidIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UidIn(uid ...uint32) UserShareCardVmQuerySet {
	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 UserShareCardVmQuerySet) UidLt(uid uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("uid < ?", uid))
}

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

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

// UidNotIn is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UidNotIn(uid ...uint32) UserShareCardVmQuerySet {
	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 UserShareCardVmQuerySet) UpdatedAtEq(updatedAt time.Time) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("updated_at = ?", updatedAt))
}

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

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

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

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

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

// UserShareCardBillIdEq is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdEq(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id = ?", userShareCardBillId))
}

// UserShareCardBillIdGt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdGt(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id > ?", userShareCardBillId))
}

// UserShareCardBillIdGte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdGte(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id >= ?", userShareCardBillId))
}

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

// UserShareCardBillIdLt is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdLt(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id < ?", userShareCardBillId))
}

// UserShareCardBillIdLte is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdLte(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id <= ?", userShareCardBillId))
}

// UserShareCardBillIdNe is an autogenerated method
// nolint: dupl
func (qs UserShareCardVmQuerySet) UserShareCardBillIdNe(userShareCardBillId uint32) UserShareCardVmQuerySet {
	return qs.w(qs.db.Where("user_share_card_bill_id != ?", userShareCardBillId))
}

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

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

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

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

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

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

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

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

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

// SetBillSn is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetBillSn(billSn string) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.BillSn)] = billSn
	return u
}

// SetCardProfit is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetCardProfit(cardProfit uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.CardProfit)] = cardProfit
	return u
}

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

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

// SetGameCardGoodsId is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetGameCardGoodsId(gameCardGoodsId uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.GameCardGoodsId)] = gameCardGoodsId
	return u
}

// SetGameCardId is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetGameCardId(gameCardId uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.GameCardId)] = gameCardId
	return u
}

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

// SetProvideDate is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetProvideDate(provideDate string) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.ProvideDate)] = provideDate
	return u
}

// SetSerialNumber is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetSerialNumber(serialNumber string) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.SerialNumber)] = serialNumber
	return u
}

// SetShareCardGameVmId is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetShareCardGameVmId(shareCardGameVmId uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.ShareCardGameVmId)] = shareCardGameVmId
	return u
}

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

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

// SetUserShareCardBillId is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetUserShareCardBillId(userShareCardBillId uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.UserShareCardBillId)] = userShareCardBillId
	return u
}

// SetVm is an autogenerated method
// nolint: dupl
func (u UserShareCardVmUpdater) SetVm(vm uint32) UserShareCardVmUpdater {
	u.fields[string(UserShareCardVmDBSchema.Vm)] = vm
	return u
}

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

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

// ===== END of query set UserShareCardVmQuerySet

// ===== BEGIN of UserShareCardVm modifiers

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

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

// UserShareCardVmDBSchema stores db field names of UserShareCardVm
var UserShareCardVmDBSchema = struct {
	ID                  UserShareCardVmDBSchemaField
	CreatedAt           UserShareCardVmDBSchemaField
	UpdatedAt           UserShareCardVmDBSchemaField
	DeletedAt           UserShareCardVmDBSchemaField
	ShareCardGameVmId   UserShareCardVmDBSchemaField
	Uid                 UserShareCardVmDBSchemaField
	SerialNumber        UserShareCardVmDBSchemaField
	BillSn              UserShareCardVmDBSchemaField
	GameCardId          UserShareCardVmDBSchemaField
	GameCardGoodsId     UserShareCardVmDBSchemaField
	UserShareCardBillId UserShareCardVmDBSchemaField
	CardProfit          UserShareCardVmDBSchemaField
	Vm                  UserShareCardVmDBSchemaField
	ProvideDate         UserShareCardVmDBSchemaField
}{

	ID:                  UserShareCardVmDBSchemaField("id"),
	CreatedAt:           UserShareCardVmDBSchemaField("created_at"),
	UpdatedAt:           UserShareCardVmDBSchemaField("updated_at"),
	DeletedAt:           UserShareCardVmDBSchemaField("deleted_at"),
	ShareCardGameVmId:   UserShareCardVmDBSchemaField("share_card_game_vm_id"),
	Uid:                 UserShareCardVmDBSchemaField("uid"),
	SerialNumber:        UserShareCardVmDBSchemaField("serial_number"),
	BillSn:              UserShareCardVmDBSchemaField("bill_sn"),
	GameCardId:          UserShareCardVmDBSchemaField("game_card_id"),
	GameCardGoodsId:     UserShareCardVmDBSchemaField("game_card_goods_id"),
	UserShareCardBillId: UserShareCardVmDBSchemaField("user_share_card_bill_id"),
	CardProfit:          UserShareCardVmDBSchemaField("card_profit"),
	Vm:                  UserShareCardVmDBSchemaField("vm"),
	ProvideDate:         UserShareCardVmDBSchemaField("provide_date"),
}

// Update updates UserShareCardVm fields by primary key
// nolint: dupl
func (o *UserShareCardVm) Update(db *gorm.DB, fields ...UserShareCardVmDBSchemaField) error {
	dbNameToFieldName := map[string]interface{}{
		"id":                      o.ID,
		"created_at":              o.CreatedAt,
		"updated_at":              o.UpdatedAt,
		"deleted_at":              o.DeletedAt,
		"share_card_game_vm_id":   o.ShareCardGameVmId,
		"uid":                     o.Uid,
		"serial_number":           o.SerialNumber,
		"bill_sn":                 o.BillSn,
		"game_card_id":            o.GameCardId,
		"game_card_goods_id":      o.GameCardGoodsId,
		"user_share_card_bill_id": o.UserShareCardBillId,
		"card_profit":             o.CardProfit,
		"vm":                      o.Vm,
		"provide_date":            o.ProvideDate,
	}
	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 UserShareCardVm %v fields %v: %s",
			o, fields, err)
	}

	return nil
}

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

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

// ===== END of UserShareCardVm modifiers

// ===== END of all query sets
