// Code generated by ent, DO NOT EDIT.

package vault

import (
	"PasswordManager/ent/predicate"
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/google/uuid"
)

// ID filters vertices based on their ID field.
func ID(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldID, id))
}

// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldID, id))
}

// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldID, id))
}

// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldID, ids...))
}

// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldID, ids...))
}

// IDGT applies the GT predicate on the ID field.
func IDGT(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldID, id))
}

// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldID, id))
}

// IDLT applies the LT predicate on the ID field.
func IDLT(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldID, id))
}

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldID, id))
}

// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldCreatedAt, v))
}

// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldName, v))
}

// NameIv applies equality check predicate on the "nameIv" field. It's identical to NameIvEQ.
func NameIv(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldNameIv, v))
}

// Colour applies equality check predicate on the "colour" field. It's identical to ColourEQ.
func Colour(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldColour, v))
}

// ColourIv applies equality check predicate on the "colourIv" field. It's identical to ColourIvEQ.
func ColourIv(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldColourIv, v))
}

// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldCreatedAt, v))
}

// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNEQ(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldCreatedAt, v))
}

// CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtIn(vs ...time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldCreatedAt, vs...))
}

// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldCreatedAt, vs...))
}

// CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGT(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldCreatedAt, v))
}

// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtGTE(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldCreatedAt, v))
}

// CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLT(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldCreatedAt, v))
}

// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtLTE(v time.Time) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldCreatedAt, v))
}

// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldName, v))
}

// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldName, v))
}

// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldName, vs...))
}

// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldName, vs...))
}

// NameGT applies the GT predicate on the "name" field.
func NameGT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldName, v))
}

// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldName, v))
}

// NameLT applies the LT predicate on the "name" field.
func NameLT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldName, v))
}

// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldName, v))
}

// NameIvEQ applies the EQ predicate on the "nameIv" field.
func NameIvEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldNameIv, v))
}

// NameIvNEQ applies the NEQ predicate on the "nameIv" field.
func NameIvNEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldNameIv, v))
}

// NameIvIn applies the In predicate on the "nameIv" field.
func NameIvIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldNameIv, vs...))
}

// NameIvNotIn applies the NotIn predicate on the "nameIv" field.
func NameIvNotIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldNameIv, vs...))
}

// NameIvGT applies the GT predicate on the "nameIv" field.
func NameIvGT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldNameIv, v))
}

// NameIvGTE applies the GTE predicate on the "nameIv" field.
func NameIvGTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldNameIv, v))
}

// NameIvLT applies the LT predicate on the "nameIv" field.
func NameIvLT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldNameIv, v))
}

// NameIvLTE applies the LTE predicate on the "nameIv" field.
func NameIvLTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldNameIv, v))
}

// ColourEQ applies the EQ predicate on the "colour" field.
func ColourEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldColour, v))
}

// ColourNEQ applies the NEQ predicate on the "colour" field.
func ColourNEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldColour, v))
}

// ColourIn applies the In predicate on the "colour" field.
func ColourIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldColour, vs...))
}

// ColourNotIn applies the NotIn predicate on the "colour" field.
func ColourNotIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldColour, vs...))
}

// ColourGT applies the GT predicate on the "colour" field.
func ColourGT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldColour, v))
}

// ColourGTE applies the GTE predicate on the "colour" field.
func ColourGTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldColour, v))
}

// ColourLT applies the LT predicate on the "colour" field.
func ColourLT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldColour, v))
}

// ColourLTE applies the LTE predicate on the "colour" field.
func ColourLTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldColour, v))
}

// ColourIvEQ applies the EQ predicate on the "colourIv" field.
func ColourIvEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldEQ(FieldColourIv, v))
}

// ColourIvNEQ applies the NEQ predicate on the "colourIv" field.
func ColourIvNEQ(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldNEQ(FieldColourIv, v))
}

// ColourIvIn applies the In predicate on the "colourIv" field.
func ColourIvIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldIn(FieldColourIv, vs...))
}

// ColourIvNotIn applies the NotIn predicate on the "colourIv" field.
func ColourIvNotIn(vs ...[]byte) predicate.Vault {
	return predicate.Vault(sql.FieldNotIn(FieldColourIv, vs...))
}

// ColourIvGT applies the GT predicate on the "colourIv" field.
func ColourIvGT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGT(FieldColourIv, v))
}

// ColourIvGTE applies the GTE predicate on the "colourIv" field.
func ColourIvGTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldGTE(FieldColourIv, v))
}

// ColourIvLT applies the LT predicate on the "colourIv" field.
func ColourIvLT(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLT(FieldColourIv, v))
}

// ColourIvLTE applies the LTE predicate on the "colourIv" field.
func ColourIvLTE(v []byte) predicate.Vault {
	return predicate.Vault(sql.FieldLTE(FieldColourIv, v))
}

// HasPasswords applies the HasEdge predicate on the "passwords" edge.
func HasPasswords() predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, PasswordsTable, PasswordsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasPasswordsWith applies the HasEdge predicate on the "passwords" edge with a given conditions (other predicates).
func HasPasswordsWith(preds ...predicate.Password) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(PasswordsInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, PasswordsTable, PasswordsColumn),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasNotes applies the HasEdge predicate on the "notes" edge.
func HasNotes() predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, NotesTable, NotesColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasNotesWith applies the HasEdge predicate on the "notes" edge with a given conditions (other predicates).
func HasNotesWith(preds ...predicate.Note) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(NotesInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, NotesTable, NotesColumn),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func HasUserWith(preds ...predicate.User) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(UserInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Vault) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for _, p := range predicates {
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Vault) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for i, p := range predicates {
			if i > 0 {
				s1.Or()
			}
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Not applies the not operator on the given predicate.
func Not(p predicate.Vault) predicate.Vault {
	return predicate.Vault(func(s *sql.Selector) {
		p(s.Not())
	})
}
