// Code generated by ent, DO NOT EDIT.

package user

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

const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldStrengthenedMasterHash holds the string denoting the strengthenedmasterhash field in the database.
	FieldStrengthenedMasterHash = "strengthened_master_hash"
	// FieldStrengthenedMasterHashSalt holds the string denoting the strengthenedmasterhashsalt field in the database.
	FieldStrengthenedMasterHashSalt = "strengthened_master_hash_salt"
	// FieldProtectedDatabaseKey holds the string denoting the protecteddatabasekey field in the database.
	FieldProtectedDatabaseKey = "protected_database_key"
	// FieldProtectedDatabaseKeyIv holds the string denoting the protecteddatabasekeyiv field in the database.
	FieldProtectedDatabaseKeyIv = "protected_database_key_iv"
	// FieldWebauthnEnabled holds the string denoting the webauthnenabled field in the database.
	FieldWebauthnEnabled = "webauthn_enabled"
	// FieldTotpEnabled holds the string denoting the totpenabled field in the database.
	FieldTotpEnabled = "totp_enabled"
	// FieldVerified holds the string denoting the verified field in the database.
	FieldVerified = "verified"
	// EdgeTotpCredential holds the string denoting the totpcredential edge name in mutations.
	EdgeTotpCredential = "totpCredential"
	// EdgeWebauthnCredentials holds the string denoting the webauthncredentials edge name in mutations.
	EdgeWebauthnCredentials = "webauthnCredentials"
	// EdgeWebauthnRegisterChallenges holds the string denoting the webauthnregisterchallenges edge name in mutations.
	EdgeWebauthnRegisterChallenges = "webauthnRegisterChallenges"
	// EdgeVaults holds the string denoting the vaults edge name in mutations.
	EdgeVaults = "vaults"
	// EdgeSessions holds the string denoting the sessions edge name in mutations.
	EdgeSessions = "sessions"
	// EdgeChallenges holds the string denoting the challenges edge name in mutations.
	EdgeChallenges = "challenges"
	// Table holds the table name of the user in the database.
	Table = "users"
	// TotpCredentialTable is the table that holds the totpCredential relation/edge.
	TotpCredentialTable = "totp_credentials"
	// TotpCredentialInverseTable is the table name for the TotpCredential entity.
	// It exists in this package in order to avoid circular dependency with the "totpcredential" package.
	TotpCredentialInverseTable = "totp_credentials"
	// TotpCredentialColumn is the table column denoting the totpCredential relation/edge.
	TotpCredentialColumn = "user_totp_credential"
	// WebauthnCredentialsTable is the table that holds the webauthnCredentials relation/edge.
	WebauthnCredentialsTable = "web_authn_credentials"
	// WebauthnCredentialsInverseTable is the table name for the WebAuthnCredential entity.
	// It exists in this package in order to avoid circular dependency with the "webauthncredential" package.
	WebauthnCredentialsInverseTable = "web_authn_credentials"
	// WebauthnCredentialsColumn is the table column denoting the webauthnCredentials relation/edge.
	WebauthnCredentialsColumn = "user_webauthn_credentials"
	// WebauthnRegisterChallengesTable is the table that holds the webauthnRegisterChallenges relation/edge.
	WebauthnRegisterChallengesTable = "web_authn_register_challenges"
	// WebauthnRegisterChallengesInverseTable is the table name for the WebAuthnRegisterChallenge entity.
	// It exists in this package in order to avoid circular dependency with the "webauthnregisterchallenge" package.
	WebauthnRegisterChallengesInverseTable = "web_authn_register_challenges"
	// WebauthnRegisterChallengesColumn is the table column denoting the webauthnRegisterChallenges relation/edge.
	WebauthnRegisterChallengesColumn = "user_webauthn_register_challenges"
	// VaultsTable is the table that holds the vaults relation/edge.
	VaultsTable = "vaults"
	// VaultsInverseTable is the table name for the Vault entity.
	// It exists in this package in order to avoid circular dependency with the "vault" package.
	VaultsInverseTable = "vaults"
	// VaultsColumn is the table column denoting the vaults relation/edge.
	VaultsColumn = "user_vaults"
	// SessionsTable is the table that holds the sessions relation/edge.
	SessionsTable = "sessions"
	// SessionsInverseTable is the table name for the Session entity.
	// It exists in this package in order to avoid circular dependency with the "session" package.
	SessionsInverseTable = "sessions"
	// SessionsColumn is the table column denoting the sessions relation/edge.
	SessionsColumn = "user_sessions"
	// ChallengesTable is the table that holds the challenges relation/edge.
	ChallengesTable = "challenges"
	// ChallengesInverseTable is the table name for the Challenge entity.
	// It exists in this package in order to avoid circular dependency with the "challenge" package.
	ChallengesInverseTable = "challenges"
	// ChallengesColumn is the table column denoting the challenges relation/edge.
	ChallengesColumn = "user_challenges"
)

// Columns holds all SQL columns for user fields.
var Columns = []string{
	FieldID,
	FieldEmail,
	FieldStrengthenedMasterHash,
	FieldStrengthenedMasterHashSalt,
	FieldProtectedDatabaseKey,
	FieldProtectedDatabaseKeyIv,
	FieldWebauthnEnabled,
	FieldTotpEnabled,
	FieldVerified,
}

// 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 (
	// StrengthenedMasterHashValidator is a validator for the "strengthenedMasterHash" field. It is called by the builders before save.
	StrengthenedMasterHashValidator func([]byte) error
	// StrengthenedMasterHashSaltValidator is a validator for the "strengthenedMasterHashSalt" field. It is called by the builders before save.
	StrengthenedMasterHashSaltValidator func([]byte) error
	// ProtectedDatabaseKeyValidator is a validator for the "protectedDatabaseKey" field. It is called by the builders before save.
	ProtectedDatabaseKeyValidator func([]byte) error
	// ProtectedDatabaseKeyIvValidator is a validator for the "protectedDatabaseKeyIv" field. It is called by the builders before save.
	ProtectedDatabaseKeyIvValidator func([]byte) error
	// DefaultWebauthnEnabled holds the default value on creation for the "webauthnEnabled" field.
	DefaultWebauthnEnabled bool
	// DefaultTotpEnabled holds the default value on creation for the "totpEnabled" field.
	DefaultTotpEnabled bool
	// DefaultVerified holds the default value on creation for the "verified" field.
	DefaultVerified bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
