func (qs UserQuerySet) IDNotIn(ID ...uint64) UserQuerySet {
	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))
}
IDNotIn is an autogenerated method
nolint: dupl
package model
import (
	"errors"
	"fmt"
	"time"
	"github.com/jinzhu/gorm"
)
type UserQuerySet struct {
	db *gorm.DB
}
func NewUserQuerySet(db *gorm.DB) UserQuerySet {
	return UserQuerySet{
		db: db.Model(&User{}),
	}
}
func (qs UserQuerySet) w(db *gorm.DB) UserQuerySet {
	return NewUserQuerySet(db)
}
func (qs UserQuerySet) All(ret *[]User) error {
	return qs.db.Find(ret).Error
}
func (qs UserQuerySet) AvatarEq(avatar string) UserQuerySet {
	return qs.w(qs.db.Where("avatar = ?", avatar))
}
func (qs UserQuerySet) AvatarIn(avatar ...string) UserQuerySet {
	if len(avatar) == 0 {
		qs.db.AddError(errors.New("must at least pass one avatar in AvatarIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("avatar IN (?)", avatar))
}
func (qs UserQuerySet) AvatarNe(avatar string) UserQuerySet {
	return qs.w(qs.db.Where("avatar != ?", avatar))
}
func (qs UserQuerySet) AvatarNotIn(avatar ...string) UserQuerySet {
	if len(avatar) == 0 {
		qs.db.AddError(errors.New("must at least pass one avatar in AvatarNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("avatar NOT IN (?)", avatar))
}
func (qs UserQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}
func (o *User) Create(db *gorm.DB) error {
	return db.Create(o).Error
}
func (qs UserQuerySet) CreatedAtEq(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at = ?", createdAt))
}
func (qs UserQuerySet) CreatedAtGt(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at > ?", createdAt))
}
func (qs UserQuerySet) CreatedAtGte(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at >= ?", createdAt))
}
func (qs UserQuerySet) CreatedAtLt(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at < ?", createdAt))
}
func (qs UserQuerySet) CreatedAtLte(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at <= ?", createdAt))
}
func (qs UserQuerySet) CreatedAtNe(createdAt time.Time) UserQuerySet {
	return qs.w(qs.db.Where("created_at != ?", createdAt))
}
func (o *User) Delete(db *gorm.DB) error {
	return db.Delete(o).Error
}
func (qs UserQuerySet) Delete() error {
	return qs.db.Delete(User{}).Error
}
func (qs UserQuerySet) DeleteNum() (int64, error) {
	db := qs.db.Delete(User{})
	return db.RowsAffected, db.Error
}
func (qs UserQuerySet) DeleteNumUnscoped() (int64, error) {
	db := qs.db.Unscoped().Delete(User{})
	return db.RowsAffected, db.Error
}
func (qs UserQuerySet) EmailEq(email string) UserQuerySet {
	return qs.w(qs.db.Where("email = ?", email))
}
func (qs UserQuerySet) EmailIn(email ...string) UserQuerySet {
	if len(email) == 0 {
		qs.db.AddError(errors.New("must at least pass one email in EmailIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("email IN (?)", email))
}
func (qs UserQuerySet) EmailNe(email string) UserQuerySet {
	return qs.w(qs.db.Where("email != ?", email))
}
func (qs UserQuerySet) EmailNotIn(email ...string) UserQuerySet {
	if len(email) == 0 {
		qs.db.AddError(errors.New("must at least pass one email in EmailNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("email NOT IN (?)", email))
}
func (qs UserQuerySet) GetUpdater() UserUpdater {
	return NewUserUpdater(qs.db)
}
func (qs UserQuerySet) IDEq(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id = ?", ID))
}
func (qs UserQuerySet) IDGt(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id > ?", ID))
}
func (qs UserQuerySet) IDGte(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id >= ?", ID))
}
func (qs UserQuerySet) IDIn(ID ...uint64) UserQuerySet {
	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))
}
func (qs UserQuerySet) IDLt(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id < ?", ID))
}
func (qs UserQuerySet) IDLte(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id <= ?", ID))
}
func (qs UserQuerySet) IDNe(ID uint64) UserQuerySet {
	return qs.w(qs.db.Where("id != ?", ID))
}