// Code generated by ent, DO NOT EDIT.

package bouncer

import (
	"time"

	"entgo.io/ent/dialect/sql"
)

const (
	// Label holds the string label denoting the bouncer type in the database.
	Label = "bouncer"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldAPIKey holds the string denoting the api_key field in the database.
	FieldAPIKey = "api_key"
	// FieldRevoked holds the string denoting the revoked field in the database.
	FieldRevoked = "revoked"
	// FieldIPAddress holds the string denoting the ip_address field in the database.
	FieldIPAddress = "ip_address"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldLastPull holds the string denoting the last_pull field in the database.
	FieldLastPull = "last_pull"
	// FieldAuthType holds the string denoting the auth_type field in the database.
	FieldAuthType = "auth_type"
	// FieldOsname holds the string denoting the osname field in the database.
	FieldOsname = "osname"
	// FieldOsfamily holds the string denoting the osfamily field in the database.
	FieldOsfamily = "osfamily"
	// FieldOsversion holds the string denoting the osversion field in the database.
	FieldOsversion = "osversion"
	// FieldFeatureflags holds the string denoting the featureflags field in the database.
	FieldFeatureflags = "featureflags"
	// FieldAutoCreated holds the string denoting the auto_created field in the database.
	FieldAutoCreated = "auto_created"
	// Table holds the table name of the bouncer in the database.
	Table = "bouncers"
)

// Columns holds all SQL columns for bouncer fields.
var Columns = []string{
	FieldID,
	FieldCreatedAt,
	FieldUpdatedAt,
	FieldName,
	FieldAPIKey,
	FieldRevoked,
	FieldIPAddress,
	FieldType,
	FieldVersion,
	FieldLastPull,
	FieldAuthType,
	FieldOsname,
	FieldOsfamily,
	FieldOsversion,
	FieldFeatureflags,
	FieldAutoCreated,
}

// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
	for i := range Columns {
		if column == Columns[i] {
			return true
		}
	}
	return false
}

var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultIPAddress holds the default value on creation for the "ip_address" field.
	DefaultIPAddress string
	// DefaultAuthType holds the default value on creation for the "auth_type" field.
	DefaultAuthType string
	// DefaultAutoCreated holds the default value on creation for the "auto_created" field.
	DefaultAutoCreated bool
)

// OrderOption defines the ordering options for the Bouncer queries.
type OrderOption func(*sql.Selector)

// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldID, opts...).ToFunc()
}

// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}

// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}

// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldName, opts...).ToFunc()
}

// ByAPIKey orders the results by the api_key field.
func ByAPIKey(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAPIKey, opts...).ToFunc()
}

// ByRevoked orders the results by the revoked field.
func ByRevoked(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldRevoked, opts...).ToFunc()
}

// ByIPAddress orders the results by the ip_address field.
func ByIPAddress(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldIPAddress, opts...).ToFunc()
}

// ByType orders the results by the type field.
func ByType(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldType, opts...).ToFunc()
}

// ByVersion orders the results by the version field.
func ByVersion(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldVersion, opts...).ToFunc()
}

// ByLastPull orders the results by the last_pull field.
func ByLastPull(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldLastPull, opts...).ToFunc()
}

// ByAuthType orders the results by the auth_type field.
func ByAuthType(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAuthType, opts...).ToFunc()
}

// ByOsname orders the results by the osname field.
func ByOsname(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldOsname, opts...).ToFunc()
}

// ByOsfamily orders the results by the osfamily field.
func ByOsfamily(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldOsfamily, opts...).ToFunc()
}

// ByOsversion orders the results by the osversion field.
func ByOsversion(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldOsversion, opts...).ToFunc()
}

// ByFeatureflags orders the results by the featureflags field.
func ByFeatureflags(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldFeatureflags, opts...).ToFunc()
}

// ByAutoCreated orders the results by the auto_created field.
func ByAutoCreated(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAutoCreated, opts...).ToFunc()
}
