// Code generated by ent, DO NOT EDIT.

package reminderstate

import (
	"time"

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

const (
	// Label holds the string label denoting the reminderstate type in the database.
	Label = "reminder_state"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCalendarID holds the string denoting the calendar_id field in the database.
	FieldCalendarID = "calendar_id"
	// FieldUID holds the string denoting the uid field in the database.
	FieldUID = "uid"
	// FieldOccurrenceStart holds the string denoting the occurrence_start field in the database.
	FieldOccurrenceStart = "occurrence_start"
	// FieldMinutes holds the string denoting the minutes field in the database.
	FieldMinutes = "minutes"
	// FieldFiredAt holds the string denoting the fired_at field in the database.
	FieldFiredAt = "fired_at"
	// FieldSnoozedUntil holds the string denoting the snoozed_until field in the database.
	FieldSnoozedUntil = "snoozed_until"
	// Table holds the table name of the reminderstate in the database.
	Table = "reminder_states"
)

// Columns holds all SQL columns for reminderstate fields.
var Columns = []string{
	FieldID,
	FieldCalendarID,
	FieldUID,
	FieldOccurrenceStart,
	FieldMinutes,
	FieldFiredAt,
	FieldSnoozedUntil,
}

// 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 (
	// CalendarIDValidator is a validator for the "calendar_id" field. It is called by the builders before save.
	CalendarIDValidator func(string) error
	// UIDValidator is a validator for the "uid" field. It is called by the builders before save.
	UIDValidator func(string) error
	// DefaultFiredAt holds the default value on creation for the "fired_at" field.
	DefaultFiredAt func() time.Time
)

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

// ByCalendarID orders the results by the calendar_id field.
func ByCalendarID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCalendarID, opts...).ToFunc()
}

// ByUID orders the results by the uid field.
func ByUID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldUID, opts...).ToFunc()
}

// ByOccurrenceStart orders the results by the occurrence_start field.
func ByOccurrenceStart(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldOccurrenceStart, opts...).ToFunc()
}

// ByMinutes orders the results by the minutes field.
func ByMinutes(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldMinutes, opts...).ToFunc()
}

// ByFiredAt orders the results by the fired_at field.
func ByFiredAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldFiredAt, opts...).ToFunc()
}

// BySnoozedUntil orders the results by the snoozed_until field.
func BySnoozedUntil(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldSnoozedUntil, opts...).ToFunc()
}
