// Code generated by ent, DO NOT EDIT.

package note

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

const (
	// Label holds the string label denoting the note type in the database.
	Label = "note"
	// 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"
	// FieldNameIv holds the string denoting the nameiv field in the database.
	FieldNameIv = "name_iv"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldTitleIv holds the string denoting the titleiv field in the database.
	FieldTitleIv = "title_iv"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldContentIv holds the string denoting the contentiv field in the database.
	FieldContentIv = "content_iv"
	// FieldColour holds the string denoting the colour field in the database.
	FieldColour = "colour"
	// FieldColourIv holds the string denoting the colouriv field in the database.
	FieldColourIv = "colour_iv"
	// EdgeVault holds the string denoting the vault edge name in mutations.
	EdgeVault = "vault"
	// Table holds the table name of the note in the database.
	Table = "notes"
	// VaultTable is the table that holds the vault relation/edge.
	VaultTable = "notes"
	// VaultInverseTable is the table name for the Vault entity.
	// It exists in this package in order to avoid circular dependency with the "vault" package.
	VaultInverseTable = "vaults"
	// VaultColumn is the table column denoting the vault relation/edge.
	VaultColumn = "vault_notes"
)

// Columns holds all SQL columns for note fields.
var Columns = []string{
	FieldID,
	FieldName,
	FieldNameIv,
	FieldTitle,
	FieldTitleIv,
	FieldContent,
	FieldContentIv,
	FieldColour,
	FieldColourIv,
}

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

// 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 (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func([]byte) error
	// NameIvValidator is a validator for the "nameIv" field. It is called by the builders before save.
	NameIvValidator func([]byte) error
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func([]byte) error
	// TitleIvValidator is a validator for the "titleIv" field. It is called by the builders before save.
	TitleIvValidator func([]byte) error
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func([]byte) error
	// ContentIvValidator is a validator for the "contentIv" field. It is called by the builders before save.
	ContentIvValidator func([]byte) error
	// ColourValidator is a validator for the "colour" field. It is called by the builders before save.
	ColourValidator func([]byte) error
	// ColourIvValidator is a validator for the "colourIv" field. It is called by the builders before save.
	ColourIvValidator func([]byte) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
