func (qs TaskQuerySet) Count() (int, error) {
	var count int
	err := qs.db.Count(&count).Error
	return count, err
}
Count is an autogenerated method
nolint: dupl
package model
import (
	"errors"
	"fmt"
	"time"
	"github.com/jinzhu/gorm"
	"github.com/nange/gospider/common"
)
type TaskQuerySet struct {
	db *gorm.DB
}
func NewTaskQuerySet(db *gorm.DB) TaskQuerySet {
	return TaskQuerySet{
		db: db.Model(&Task{}),
	}
}
func (qs TaskQuerySet) w(db *gorm.DB) TaskQuerySet {
	return NewTaskQuerySet(db)
}
func (qs TaskQuerySet) All(ret *[]Task) error {
	return qs.db.Find(ret).Error
}
func (qs TaskQuerySet) AutoMigrateEq(autoMigrate bool) TaskQuerySet {
	return qs.w(qs.db.Where("auto_migrate = ?", autoMigrate))
}
func (qs TaskQuerySet) AutoMigrateIn(autoMigrate ...bool) TaskQuerySet {
	if len(autoMigrate) == 0 {
		qs.db.AddError(errors.New("must at least pass one autoMigrate in AutoMigrateIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("auto_migrate IN (?)", autoMigrate))
}
func (qs TaskQuerySet) AutoMigrateNe(autoMigrate bool) TaskQuerySet {
	return qs.w(qs.db.Where("auto_migrate != ?", autoMigrate))
}
func (qs TaskQuerySet) AutoMigrateNotIn(autoMigrate ...bool) TaskQuerySet {
	if len(autoMigrate) == 0 {
		qs.db.AddError(errors.New("must at least pass one autoMigrate in AutoMigrateNotIn"))
		return qs.w(qs.db)
	}
	return qs.w(qs.db.Where("auto_migrate NOT IN (?)", autoMigrate))
}