// Code generated by ent, DO NOT EDIT.

package aliyunavatar

import (
	"time"

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

const (
	// Label holds the string label denoting the aliyunavatar type in the database.
	Label = "aliyun_avatar"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldBizID holds the string denoting the biz_id field in the database.
	FieldBizID = "biz_id"
	// FieldAccessKeyID holds the string denoting the access_key_id field in the database.
	FieldAccessKeyID = "access_key_id"
	// FieldAccessKeySecret holds the string denoting the access_key_secret field in the database.
	FieldAccessKeySecret = "access_key_secret"
	// FieldAppID holds the string denoting the app_id field in the database.
	FieldAppID = "app_id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldResponse holds the string denoting the response field in the database.
	FieldResponse = "response"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// FieldSessionID holds the string denoting the session_id field in the database.
	FieldSessionID = "session_id"
	// Table holds the table name of the aliyunavatar in the database.
	Table = "aliyun_avatar"
)

// Columns holds all SQL columns for aliyunavatar fields.
var Columns = []string{
	FieldID,
	FieldCreatedAt,
	FieldUpdatedAt,
	FieldDeletedAt,
	FieldUserID,
	FieldBizID,
	FieldAccessKeyID,
	FieldAccessKeySecret,
	FieldAppID,
	FieldTenantID,
	FieldResponse,
	FieldToken,
	FieldSessionID,
}

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

// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
//	import _ "wechat-api/ent/runtime"
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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
	// DefaultToken holds the default value on creation for the "token" field.
	DefaultToken string
	// DefaultSessionID holds the default value on creation for the "session_id" field.
	DefaultSessionID string
)

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

// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}

// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldUserID, opts...).ToFunc()
}

// ByBizID orders the results by the biz_id field.
func ByBizID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldBizID, opts...).ToFunc()
}

// ByAccessKeyID orders the results by the access_key_id field.
func ByAccessKeyID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAccessKeyID, opts...).ToFunc()
}

// ByAccessKeySecret orders the results by the access_key_secret field.
func ByAccessKeySecret(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAccessKeySecret, opts...).ToFunc()
}

// ByAppID orders the results by the app_id field.
func ByAppID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAppID, opts...).ToFunc()
}

// ByTenantID orders the results by the tenant_id field.
func ByTenantID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldTenantID, opts...).ToFunc()
}

// ByResponse orders the results by the response field.
func ByResponse(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldResponse, opts...).ToFunc()
}

// ByToken orders the results by the token field.
func ByToken(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldToken, opts...).ToFunc()
}

// BySessionID orders the results by the session_id field.
func BySessionID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldSessionID, opts...).ToFunc()
}
