// Code generated by ent, DO NOT EDIT.

package userfollows

import (
	"time"

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

const (
	// Label holds the string label denoting the userfollows type in the database.
	Label = "user_follows"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldFollowerID holds the string denoting the follower_id field in the database.
	FieldFollowerID = "follower_id"
	// FieldFolloweeID holds the string denoting the followee_id field in the database.
	FieldFolloweeID = "followee_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// Table holds the table name of the userfollows in the database.
	Table = "user_follows"
)

// Columns holds all SQL columns for userfollows fields.
var Columns = []string{
	FieldID,
	FieldFollowerID,
	FieldFolloweeID,
	FieldCreatedAt,
}

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

// OrderOption defines the ordering options for the UserFollows 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()
}

// ByFollowerID orders the results by the follower_id field.
func ByFollowerID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldFollowerID, opts...).ToFunc()
}

// ByFolloweeID orders the results by the followee_id field.
func ByFolloweeID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldFolloweeID, opts...).ToFunc()
}

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