// Code generated by ent, DO NOT EDIT.

package requestcapturelog

import (
	"time"

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

const (
	// Label holds the string label denoting the requestcapturelog type in the database.
	Label = "request_capture_log"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldAPIKeyID holds the string denoting the api_key_id field in the database.
	FieldAPIKeyID = "api_key_id"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldRequestID holds the string denoting the request_id field in the database.
	FieldRequestID = "request_id"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldMethod holds the string denoting the method field in the database.
	FieldMethod = "method"
	// FieldIPAddress holds the string denoting the ip_address field in the database.
	FieldIPAddress = "ip_address"
	// FieldRequestBody holds the string denoting the request_body field in the database.
	FieldRequestBody = "request_body"
	// FieldResponseBody holds the string denoting the response_body field in the database.
	FieldResponseBody = "response_body"
	// FieldNfsFilePath holds the string denoting the nfs_file_path field in the database.
	FieldNfsFilePath = "nfs_file_path"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// Table holds the table name of the requestcapturelog in the database.
	Table = "request_capture_logs"
)

// Columns holds all SQL columns for requestcapturelog fields.
var Columns = []string{
	FieldID,
	FieldAPIKeyID,
	FieldUserID,
	FieldRequestID,
	FieldPath,
	FieldMethod,
	FieldIPAddress,
	FieldRequestBody,
	FieldResponseBody,
	FieldNfsFilePath,
	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 (
	// RequestIDValidator is a validator for the "request_id" field. It is called by the builders before save.
	RequestIDValidator func(string) error
	// PathValidator is a validator for the "path" field. It is called by the builders before save.
	PathValidator func(string) error
	// MethodValidator is a validator for the "method" field. It is called by the builders before save.
	MethodValidator func(string) error
	// IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
	IPAddressValidator func(string) error
	// NfsFilePathValidator is a validator for the "nfs_file_path" field. It is called by the builders before save.
	NfsFilePathValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

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

// ByAPIKeyID orders the results by the api_key_id field.
func ByAPIKeyID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAPIKeyID, opts...).ToFunc()
}

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

// ByRequestID orders the results by the request_id field.
func ByRequestID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldRequestID, opts...).ToFunc()
}

// ByPath orders the results by the path field.
func ByPath(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldPath, opts...).ToFunc()
}

// ByMethod orders the results by the method field.
func ByMethod(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldMethod, opts...).ToFunc()
}

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

// ByRequestBody orders the results by the request_body field.
func ByRequestBody(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldRequestBody, opts...).ToFunc()
}

// ByResponseBody orders the results by the response_body field.
func ByResponseBody(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldResponseBody, opts...).ToFunc()
}

// ByNfsFilePath orders the results by the nfs_file_path field.
func ByNfsFilePath(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldNfsFilePath, opts...).ToFunc()
}

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