// Code generated by ent, DO NOT EDIT.

package ent

import (
	"PasswordManager/ent/additionalfield"
	"PasswordManager/ent/challenge"
	"PasswordManager/ent/emailchallenge"
	"PasswordManager/ent/note"
	"PasswordManager/ent/password"
	"PasswordManager/ent/schema"
	"PasswordManager/ent/session"
	"PasswordManager/ent/totpcredential"
	"PasswordManager/ent/url"
	"PasswordManager/ent/user"
	"PasswordManager/ent/vault"
	"PasswordManager/ent/webauthnchallenge"
	"PasswordManager/ent/webauthncredential"
	"PasswordManager/ent/webauthnregisterchallenge"
	"time"

	"github.com/google/uuid"
)

// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
	additionalfieldFields := schema.AdditionalField{}.Fields()
	_ = additionalfieldFields
	// additionalfieldDescKey is the schema descriptor for key field.
	additionalfieldDescKey := additionalfieldFields[1].Descriptor()
	// additionalfield.KeyValidator is a validator for the "key" field. It is called by the builders before save.
	additionalfield.KeyValidator = additionalfieldDescKey.Validators[0].(func([]byte) error)
	// additionalfieldDescKeyIv is the schema descriptor for keyIv field.
	additionalfieldDescKeyIv := additionalfieldFields[2].Descriptor()
	// additionalfield.KeyIvValidator is a validator for the "keyIv" field. It is called by the builders before save.
	additionalfield.KeyIvValidator = additionalfieldDescKeyIv.Validators[0].(func([]byte) error)
	// additionalfieldDescValue is the schema descriptor for value field.
	additionalfieldDescValue := additionalfieldFields[3].Descriptor()
	// additionalfield.ValueValidator is a validator for the "value" field. It is called by the builders before save.
	additionalfield.ValueValidator = additionalfieldDescValue.Validators[0].(func([]byte) error)
	// additionalfieldDescValueIv is the schema descriptor for valueIv field.
	additionalfieldDescValueIv := additionalfieldFields[4].Descriptor()
	// additionalfield.ValueIvValidator is a validator for the "valueIv" field. It is called by the builders before save.
	additionalfield.ValueIvValidator = additionalfieldDescValueIv.Validators[0].(func([]byte) error)
	// additionalfieldDescID is the schema descriptor for id field.
	additionalfieldDescID := additionalfieldFields[0].Descriptor()
	// additionalfield.DefaultID holds the default value on creation for the id field.
	additionalfield.DefaultID = additionalfieldDescID.Default.(func() uuid.UUID)
	challengeFields := schema.Challenge{}.Fields()
	_ = challengeFields
	// challengeDescExpiry is the schema descriptor for expiry field.
	challengeDescExpiry := challengeFields[1].Descriptor()
	// challenge.DefaultExpiry holds the default value on creation for the expiry field.
	challenge.DefaultExpiry = challengeDescExpiry.Default.(func() time.Time)
	// challengeDescID is the schema descriptor for id field.
	challengeDescID := challengeFields[0].Descriptor()
	// challenge.DefaultID holds the default value on creation for the id field.
	challenge.DefaultID = challengeDescID.Default.(func() uuid.UUID)
	emailchallengeFields := schema.EmailChallenge{}.Fields()
	_ = emailchallengeFields
	// emailchallengeDescID is the schema descriptor for id field.
	emailchallengeDescID := emailchallengeFields[0].Descriptor()
	// emailchallenge.DefaultID holds the default value on creation for the id field.
	emailchallenge.DefaultID = emailchallengeDescID.Default.(func() uuid.UUID)
	noteFields := schema.Note{}.Fields()
	_ = noteFields
	// noteDescName is the schema descriptor for name field.
	noteDescName := noteFields[1].Descriptor()
	// note.NameValidator is a validator for the "name" field. It is called by the builders before save.
	note.NameValidator = noteDescName.Validators[0].(func([]byte) error)
	// noteDescNameIv is the schema descriptor for nameIv field.
	noteDescNameIv := noteFields[2].Descriptor()
	// note.NameIvValidator is a validator for the "nameIv" field. It is called by the builders before save.
	note.NameIvValidator = noteDescNameIv.Validators[0].(func([]byte) error)
	// noteDescTitle is the schema descriptor for title field.
	noteDescTitle := noteFields[3].Descriptor()
	// note.TitleValidator is a validator for the "title" field. It is called by the builders before save.
	note.TitleValidator = noteDescTitle.Validators[0].(func([]byte) error)
	// noteDescTitleIv is the schema descriptor for titleIv field.
	noteDescTitleIv := noteFields[4].Descriptor()
	// note.TitleIvValidator is a validator for the "titleIv" field. It is called by the builders before save.
	note.TitleIvValidator = noteDescTitleIv.Validators[0].(func([]byte) error)
	// noteDescContent is the schema descriptor for content field.
	noteDescContent := noteFields[5].Descriptor()
	// note.ContentValidator is a validator for the "content" field. It is called by the builders before save.
	note.ContentValidator = noteDescContent.Validators[0].(func([]byte) error)
	// noteDescContentIv is the schema descriptor for contentIv field.
	noteDescContentIv := noteFields[6].Descriptor()
	// note.ContentIvValidator is a validator for the "contentIv" field. It is called by the builders before save.
	note.ContentIvValidator = noteDescContentIv.Validators[0].(func([]byte) error)
	// noteDescColour is the schema descriptor for colour field.
	noteDescColour := noteFields[7].Descriptor()
	// note.ColourValidator is a validator for the "colour" field. It is called by the builders before save.
	note.ColourValidator = noteDescColour.Validators[0].(func([]byte) error)
	// noteDescColourIv is the schema descriptor for colourIv field.
	noteDescColourIv := noteFields[8].Descriptor()
	// note.ColourIvValidator is a validator for the "colourIv" field. It is called by the builders before save.
	note.ColourIvValidator = noteDescColourIv.Validators[0].(func([]byte) error)
	// noteDescID is the schema descriptor for id field.
	noteDescID := noteFields[0].Descriptor()
	// note.DefaultID holds the default value on creation for the id field.
	note.DefaultID = noteDescID.Default.(func() uuid.UUID)
	passwordFields := schema.Password{}.Fields()
	_ = passwordFields
	// passwordDescName is the schema descriptor for name field.
	passwordDescName := passwordFields[1].Descriptor()
	// password.NameValidator is a validator for the "name" field. It is called by the builders before save.
	password.NameValidator = passwordDescName.Validators[0].(func([]byte) error)
	// passwordDescNameIv is the schema descriptor for nameIv field.
	passwordDescNameIv := passwordFields[2].Descriptor()
	// password.NameIvValidator is a validator for the "nameIv" field. It is called by the builders before save.
	password.NameIvValidator = passwordDescNameIv.Validators[0].(func([]byte) error)
	// passwordDescUsername is the schema descriptor for username field.
	passwordDescUsername := passwordFields[3].Descriptor()
	// password.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	password.UsernameValidator = passwordDescUsername.Validators[0].(func([]byte) error)
	// passwordDescUsernameIv is the schema descriptor for usernameIv field.
	passwordDescUsernameIv := passwordFields[4].Descriptor()
	// password.UsernameIvValidator is a validator for the "usernameIv" field. It is called by the builders before save.
	password.UsernameIvValidator = passwordDescUsernameIv.Validators[0].(func([]byte) error)
	// passwordDescPassword is the schema descriptor for password field.
	passwordDescPassword := passwordFields[5].Descriptor()
	// password.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
	password.PasswordValidator = passwordDescPassword.Validators[0].(func([]byte) error)
	// passwordDescPasswordIv is the schema descriptor for passwordIv field.
	passwordDescPasswordIv := passwordFields[6].Descriptor()
	// password.PasswordIvValidator is a validator for the "passwordIv" field. It is called by the builders before save.
	password.PasswordIvValidator = passwordDescPasswordIv.Validators[0].(func([]byte) error)
	// passwordDescColour is the schema descriptor for colour field.
	passwordDescColour := passwordFields[7].Descriptor()
	// password.ColourValidator is a validator for the "colour" field. It is called by the builders before save.
	password.ColourValidator = passwordDescColour.Validators[0].(func([]byte) error)
	// passwordDescColourIv is the schema descriptor for colourIv field.
	passwordDescColourIv := passwordFields[8].Descriptor()
	// password.ColourIvValidator is a validator for the "colourIv" field. It is called by the builders before save.
	password.ColourIvValidator = passwordDescColourIv.Validators[0].(func([]byte) error)
	// passwordDescID is the schema descriptor for id field.
	passwordDescID := passwordFields[0].Descriptor()
	// password.DefaultID holds the default value on creation for the id field.
	password.DefaultID = passwordDescID.Default.(func() uuid.UUID)
	sessionFields := schema.Session{}.Fields()
	_ = sessionFields
	// sessionDescN is the schema descriptor for n field.
	sessionDescN := sessionFields[1].Descriptor()
	// session.NValidator is a validator for the "n" field. It is called by the builders before save.
	session.NValidator = sessionDescN.Validators[0].(func([]byte) error)
	// sessionDescID is the schema descriptor for id field.
	sessionDescID := sessionFields[0].Descriptor()
	// session.DefaultID holds the default value on creation for the id field.
	session.DefaultID = sessionDescID.Default.(func() uuid.UUID)
	totpcredentialFields := schema.TotpCredential{}.Fields()
	_ = totpcredentialFields
	// totpcredentialDescSecret is the schema descriptor for secret field.
	totpcredentialDescSecret := totpcredentialFields[1].Descriptor()
	// totpcredential.SecretValidator is a validator for the "secret" field. It is called by the builders before save.
	totpcredential.SecretValidator = totpcredentialDescSecret.Validators[0].(func(string) error)
	// totpcredentialDescValidated is the schema descriptor for validated field.
	totpcredentialDescValidated := totpcredentialFields[2].Descriptor()
	// totpcredential.DefaultValidated holds the default value on creation for the validated field.
	totpcredential.DefaultValidated = totpcredentialDescValidated.Default.(bool)
	// totpcredentialDescID is the schema descriptor for id field.
	totpcredentialDescID := totpcredentialFields[0].Descriptor()
	// totpcredential.DefaultID holds the default value on creation for the id field.
	totpcredential.DefaultID = totpcredentialDescID.Default.(func() uuid.UUID)
	urlFields := schema.Url{}.Fields()
	_ = urlFields
	// urlDescURL is the schema descriptor for url field.
	urlDescURL := urlFields[1].Descriptor()
	// url.URLValidator is a validator for the "url" field. It is called by the builders before save.
	url.URLValidator = urlDescURL.Validators[0].(func([]byte) error)
	// urlDescUrlIv is the schema descriptor for urlIv field.
	urlDescUrlIv := urlFields[2].Descriptor()
	// url.UrlIvValidator is a validator for the "urlIv" field. It is called by the builders before save.
	url.UrlIvValidator = urlDescUrlIv.Validators[0].(func([]byte) error)
	// urlDescID is the schema descriptor for id field.
	urlDescID := urlFields[0].Descriptor()
	// url.DefaultID holds the default value on creation for the id field.
	url.DefaultID = urlDescID.Default.(func() uuid.UUID)
	userFields := schema.User{}.Fields()
	_ = userFields
	// userDescStrengthenedMasterHash is the schema descriptor for strengthenedMasterHash field.
	userDescStrengthenedMasterHash := userFields[2].Descriptor()
	// user.StrengthenedMasterHashValidator is a validator for the "strengthenedMasterHash" field. It is called by the builders before save.
	user.StrengthenedMasterHashValidator = userDescStrengthenedMasterHash.Validators[0].(func([]byte) error)
	// userDescStrengthenedMasterHashSalt is the schema descriptor for strengthenedMasterHashSalt field.
	userDescStrengthenedMasterHashSalt := userFields[3].Descriptor()
	// user.StrengthenedMasterHashSaltValidator is a validator for the "strengthenedMasterHashSalt" field. It is called by the builders before save.
	user.StrengthenedMasterHashSaltValidator = userDescStrengthenedMasterHashSalt.Validators[0].(func([]byte) error)
	// userDescProtectedDatabaseKey is the schema descriptor for protectedDatabaseKey field.
	userDescProtectedDatabaseKey := userFields[4].Descriptor()
	// user.ProtectedDatabaseKeyValidator is a validator for the "protectedDatabaseKey" field. It is called by the builders before save.
	user.ProtectedDatabaseKeyValidator = userDescProtectedDatabaseKey.Validators[0].(func([]byte) error)
	// userDescProtectedDatabaseKeyIv is the schema descriptor for protectedDatabaseKeyIv field.
	userDescProtectedDatabaseKeyIv := userFields[5].Descriptor()
	// user.ProtectedDatabaseKeyIvValidator is a validator for the "protectedDatabaseKeyIv" field. It is called by the builders before save.
	user.ProtectedDatabaseKeyIvValidator = userDescProtectedDatabaseKeyIv.Validators[0].(func([]byte) error)
	// userDescWebauthnEnabled is the schema descriptor for webauthnEnabled field.
	userDescWebauthnEnabled := userFields[6].Descriptor()
	// user.DefaultWebauthnEnabled holds the default value on creation for the webauthnEnabled field.
	user.DefaultWebauthnEnabled = userDescWebauthnEnabled.Default.(bool)
	// userDescTotpEnabled is the schema descriptor for totpEnabled field.
	userDescTotpEnabled := userFields[7].Descriptor()
	// user.DefaultTotpEnabled holds the default value on creation for the totpEnabled field.
	user.DefaultTotpEnabled = userDescTotpEnabled.Default.(bool)
	// userDescVerified is the schema descriptor for verified field.
	userDescVerified := userFields[8].Descriptor()
	// user.DefaultVerified holds the default value on creation for the verified field.
	user.DefaultVerified = userDescVerified.Default.(bool)
	// userDescID is the schema descriptor for id field.
	userDescID := userFields[0].Descriptor()
	// user.DefaultID holds the default value on creation for the id field.
	user.DefaultID = userDescID.Default.(func() uuid.UUID)
	vaultFields := schema.Vault{}.Fields()
	_ = vaultFields
	// vaultDescCreatedAt is the schema descriptor for createdAt field.
	vaultDescCreatedAt := vaultFields[1].Descriptor()
	// vault.DefaultCreatedAt holds the default value on creation for the createdAt field.
	vault.DefaultCreatedAt = vaultDescCreatedAt.Default.(func() time.Time)
	// vaultDescName is the schema descriptor for name field.
	vaultDescName := vaultFields[2].Descriptor()
	// vault.NameValidator is a validator for the "name" field. It is called by the builders before save.
	vault.NameValidator = vaultDescName.Validators[0].(func([]byte) error)
	// vaultDescNameIv is the schema descriptor for nameIv field.
	vaultDescNameIv := vaultFields[3].Descriptor()
	// vault.NameIvValidator is a validator for the "nameIv" field. It is called by the builders before save.
	vault.NameIvValidator = vaultDescNameIv.Validators[0].(func([]byte) error)
	// vaultDescColour is the schema descriptor for colour field.
	vaultDescColour := vaultFields[4].Descriptor()
	// vault.ColourValidator is a validator for the "colour" field. It is called by the builders before save.
	vault.ColourValidator = vaultDescColour.Validators[0].(func([]byte) error)
	// vaultDescColourIv is the schema descriptor for colourIv field.
	vaultDescColourIv := vaultFields[5].Descriptor()
	// vault.ColourIvValidator is a validator for the "colourIv" field. It is called by the builders before save.
	vault.ColourIvValidator = vaultDescColourIv.Validators[0].(func([]byte) error)
	// vaultDescID is the schema descriptor for id field.
	vaultDescID := vaultFields[0].Descriptor()
	// vault.DefaultID holds the default value on creation for the id field.
	vault.DefaultID = vaultDescID.Default.(func() uuid.UUID)
	webauthnchallengeFields := schema.WebAuthnChallenge{}.Fields()
	_ = webauthnchallengeFields
	// webauthnchallengeDescID is the schema descriptor for id field.
	webauthnchallengeDescID := webauthnchallengeFields[0].Descriptor()
	// webauthnchallenge.DefaultID holds the default value on creation for the id field.
	webauthnchallenge.DefaultID = webauthnchallengeDescID.Default.(func() uuid.UUID)
	webauthncredentialFields := schema.WebAuthnCredential{}.Fields()
	_ = webauthncredentialFields
	// webauthncredentialDescCreatedAt is the schema descriptor for createdAt field.
	webauthncredentialDescCreatedAt := webauthncredentialFields[2].Descriptor()
	// webauthncredential.DefaultCreatedAt holds the default value on creation for the createdAt field.
	webauthncredential.DefaultCreatedAt = webauthncredentialDescCreatedAt.Default.(func() time.Time)
	// webauthncredentialDescID is the schema descriptor for id field.
	webauthncredentialDescID := webauthncredentialFields[0].Descriptor()
	// webauthncredential.DefaultID holds the default value on creation for the id field.
	webauthncredential.DefaultID = webauthncredentialDescID.Default.(func() uuid.UUID)
	webauthnregisterchallengeFields := schema.WebAuthnRegisterChallenge{}.Fields()
	_ = webauthnregisterchallengeFields
	// webauthnregisterchallengeDescID is the schema descriptor for id field.
	webauthnregisterchallengeDescID := webauthnregisterchallengeFields[0].Descriptor()
	// webauthnregisterchallenge.DefaultID holds the default value on creation for the id field.
	webauthnregisterchallenge.DefaultID = webauthnregisterchallengeDescID.Default.(func() uuid.UUID)
}
