// Code generated by ent, DO NOT EDIT.

package emailchallenge

import (
	"github.com/google/uuid"
)

const (
	// Label holds the string label denoting the emailchallenge type in the database.
	Label = "email_challenge"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// EdgeChallenge holds the string denoting the challenge edge name in mutations.
	EdgeChallenge = "challenge"
	// Table holds the table name of the emailchallenge in the database.
	Table = "email_challenges"
	// ChallengeTable is the table that holds the challenge relation/edge.
	ChallengeTable = "email_challenges"
	// ChallengeInverseTable is the table name for the Challenge entity.
	// It exists in this package in order to avoid circular dependency with the "challenge" package.
	ChallengeInverseTable = "challenges"
	// ChallengeColumn is the table column denoting the challenge relation/edge.
	ChallengeColumn = "challenge_email_challenge"
)

// Columns holds all SQL columns for emailchallenge fields.
var Columns = []string{
	FieldID,
	FieldCode,
}

// ForeignKeys holds the SQL foreign-keys that are owned by the "email_challenges"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
	"challenge_email_challenge",
}

// 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
		}
	}
	for i := range ForeignKeys {
		if column == ForeignKeys[i] {
			return true
		}
	}
	return false
}

var (
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
