// Code generated by ent, DO NOT EDIT.

package webauthncredential

import (
	"time"

	"github.com/google/uuid"
)

const (
	// Label holds the string label denoting the webauthncredential type in the database.
	Label = "web_authn_credential"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCreatedAt holds the string denoting the createdat field in the database.
	FieldCreatedAt = "created_at"
	// FieldCredentialId holds the string denoting the credentialid field in the database.
	FieldCredentialId = "credential_id"
	// FieldPublicKey holds the string denoting the publickey field in the database.
	FieldPublicKey = "public_key"
	// FieldAttestationType holds the string denoting the attestationtype field in the database.
	FieldAttestationType = "attestation_type"
	// FieldTransport holds the string denoting the transport field in the database.
	FieldTransport = "transport"
	// FieldAaguid holds the string denoting the aaguid field in the database.
	FieldAaguid = "aaguid"
	// FieldSignCount holds the string denoting the signcount field in the database.
	FieldSignCount = "sign_count"
	// FieldCloneWarning holds the string denoting the clonewarning field in the database.
	FieldCloneWarning = "clone_warning"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the webauthncredential in the database.
	Table = "web_authn_credentials"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "web_authn_credentials"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_webauthn_credentials"
)

// Columns holds all SQL columns for webauthncredential fields.
var Columns = []string{
	FieldID,
	FieldName,
	FieldCreatedAt,
	FieldCredentialId,
	FieldPublicKey,
	FieldAttestationType,
	FieldTransport,
	FieldAaguid,
	FieldSignCount,
	FieldCloneWarning,
}

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

// 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 (
	// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
