// Code generated by ent, DO NOT EDIT.

package disputetimeline

import (
	"time"

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

const (
	// Label holds the string label denoting the disputetimeline type in the database.
	Label = "dispute_timeline"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldDisputeID holds the string denoting the dispute_id field in the database.
	FieldDisputeID = "dispute_id"
	// FieldEventType holds the string denoting the event_type field in the database.
	FieldEventType = "event_type"
	// FieldActorID holds the string denoting the actor_id field in the database.
	FieldActorID = "actor_id"
	// FieldActorName holds the string denoting the actor_name field in the database.
	FieldActorName = "actor_name"
	// FieldDetails holds the string denoting the details field in the database.
	FieldDetails = "details"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// Table holds the table name of the disputetimeline in the database.
	Table = "dispute_timeline"
)

// Columns holds all SQL columns for disputetimeline fields.
var Columns = []string{
	FieldID,
	FieldDisputeID,
	FieldEventType,
	FieldActorID,
	FieldActorName,
	FieldDetails,
	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 (
	// EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
	EventTypeValidator func(string) error
	// ActorNameValidator is a validator for the "actor_name" field. It is called by the builders before save.
	ActorNameValidator 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 DisputeTimeline 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()
}

// ByDisputeID orders the results by the dispute_id field.
func ByDisputeID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldDisputeID, opts...).ToFunc()
}

// ByEventType orders the results by the event_type field.
func ByEventType(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldEventType, opts...).ToFunc()
}

// ByActorID orders the results by the actor_id field.
func ByActorID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldActorID, opts...).ToFunc()
}

// ByActorName orders the results by the actor_name field.
func ByActorName(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldActorName, opts...).ToFunc()
}

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