// Code generated by ent, DO NOT EDIT.

package webauthnchallenge

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

const (
	// Label holds the string label denoting the webauthnchallenge type in the database.
	Label = "web_authn_challenge"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSdChallenge holds the string denoting the sdchallenge field in the database.
	FieldSdChallenge = "sd_challenge"
	// FieldUserId holds the string denoting the userid field in the database.
	FieldUserId = "user_id"
	// FieldAllowedCredentialIds holds the string denoting the allowedcredentialids field in the database.
	FieldAllowedCredentialIds = "allowed_credential_ids"
	// FieldUserVerification holds the string denoting the userverification field in the database.
	FieldUserVerification = "user_verification"
	// FieldExtensions holds the string denoting the extensions field in the database.
	FieldExtensions = "extensions"
	// EdgeChallenge holds the string denoting the challenge edge name in mutations.
	EdgeChallenge = "challenge"
	// Table holds the table name of the webauthnchallenge in the database.
	Table = "web_authn_challenges"
	// ChallengeTable is the table that holds the challenge relation/edge.
	ChallengeTable = "web_authn_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_webauthn_challenge"
)

// Columns holds all SQL columns for webauthnchallenge fields.
var Columns = []string{
	FieldID,
	FieldSdChallenge,
	FieldUserId,
	FieldAllowedCredentialIds,
	FieldUserVerification,
	FieldExtensions,
}

// ForeignKeys holds the SQL foreign-keys that are owned by the "web_authn_challenges"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
	"challenge_webauthn_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
)
