// Code generated by ent, DO NOT EDIT.

package wallet

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/appditto/pippin_nano_wallet/libs/database/ent/predicate"
	"github.com/google/uuid"
)

// ID filters vertices based on their ID field.
func ID(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldID), id))
	})
}

// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldID), id))
	})
}

// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldID), id))
	})
}

// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		v := make([]interface{}, len(ids))
		for i := range v {
			v[i] = ids[i]
		}
		s.Where(sql.In(s.C(FieldID), v...))
	})
}

// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		v := make([]interface{}, len(ids))
		for i := range v {
			v[i] = ids[i]
		}
		s.Where(sql.NotIn(s.C(FieldID), v...))
	})
}

// IDGT applies the GT predicate on the ID field.
func IDGT(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GT(s.C(FieldID), id))
	})
}

// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GTE(s.C(FieldID), id))
	})
}

// IDLT applies the LT predicate on the ID field.
func IDLT(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LT(s.C(FieldID), id))
	})
}

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LTE(s.C(FieldID), id))
	})
}

// Seed applies equality check predicate on the "seed" field. It's identical to SeedEQ.
func Seed(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldSeed), v))
	})
}

// Representative applies equality check predicate on the "representative" field. It's identical to RepresentativeEQ.
func Representative(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldRepresentative), v))
	})
}

// Encrypted applies equality check predicate on the "encrypted" field. It's identical to EncryptedEQ.
func Encrypted(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldEncrypted), v))
	})
}

// Work applies equality check predicate on the "work" field. It's identical to WorkEQ.
func Work(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldWork), v))
	})
}

// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldCreatedAt), v))
	})
}

// SeedEQ applies the EQ predicate on the "seed" field.
func SeedEQ(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldSeed), v))
	})
}

// SeedNEQ applies the NEQ predicate on the "seed" field.
func SeedNEQ(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldSeed), v))
	})
}

// SeedIn applies the In predicate on the "seed" field.
func SeedIn(vs ...string) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.In(s.C(FieldSeed), v...))
	})
}

// SeedNotIn applies the NotIn predicate on the "seed" field.
func SeedNotIn(vs ...string) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NotIn(s.C(FieldSeed), v...))
	})
}

// SeedGT applies the GT predicate on the "seed" field.
func SeedGT(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GT(s.C(FieldSeed), v))
	})
}

// SeedGTE applies the GTE predicate on the "seed" field.
func SeedGTE(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GTE(s.C(FieldSeed), v))
	})
}

// SeedLT applies the LT predicate on the "seed" field.
func SeedLT(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LT(s.C(FieldSeed), v))
	})
}

// SeedLTE applies the LTE predicate on the "seed" field.
func SeedLTE(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LTE(s.C(FieldSeed), v))
	})
}

// SeedContains applies the Contains predicate on the "seed" field.
func SeedContains(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.Contains(s.C(FieldSeed), v))
	})
}

// SeedHasPrefix applies the HasPrefix predicate on the "seed" field.
func SeedHasPrefix(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.HasPrefix(s.C(FieldSeed), v))
	})
}

// SeedHasSuffix applies the HasSuffix predicate on the "seed" field.
func SeedHasSuffix(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.HasSuffix(s.C(FieldSeed), v))
	})
}

// SeedEqualFold applies the EqualFold predicate on the "seed" field.
func SeedEqualFold(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EqualFold(s.C(FieldSeed), v))
	})
}

// SeedContainsFold applies the ContainsFold predicate on the "seed" field.
func SeedContainsFold(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.ContainsFold(s.C(FieldSeed), v))
	})
}

// RepresentativeEQ applies the EQ predicate on the "representative" field.
func RepresentativeEQ(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldRepresentative), v))
	})
}

// RepresentativeNEQ applies the NEQ predicate on the "representative" field.
func RepresentativeNEQ(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldRepresentative), v))
	})
}

// RepresentativeIn applies the In predicate on the "representative" field.
func RepresentativeIn(vs ...string) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.In(s.C(FieldRepresentative), v...))
	})
}

// RepresentativeNotIn applies the NotIn predicate on the "representative" field.
func RepresentativeNotIn(vs ...string) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NotIn(s.C(FieldRepresentative), v...))
	})
}

// RepresentativeGT applies the GT predicate on the "representative" field.
func RepresentativeGT(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GT(s.C(FieldRepresentative), v))
	})
}

// RepresentativeGTE applies the GTE predicate on the "representative" field.
func RepresentativeGTE(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GTE(s.C(FieldRepresentative), v))
	})
}

// RepresentativeLT applies the LT predicate on the "representative" field.
func RepresentativeLT(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LT(s.C(FieldRepresentative), v))
	})
}

// RepresentativeLTE applies the LTE predicate on the "representative" field.
func RepresentativeLTE(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LTE(s.C(FieldRepresentative), v))
	})
}

// RepresentativeContains applies the Contains predicate on the "representative" field.
func RepresentativeContains(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.Contains(s.C(FieldRepresentative), v))
	})
}

// RepresentativeHasPrefix applies the HasPrefix predicate on the "representative" field.
func RepresentativeHasPrefix(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.HasPrefix(s.C(FieldRepresentative), v))
	})
}

// RepresentativeHasSuffix applies the HasSuffix predicate on the "representative" field.
func RepresentativeHasSuffix(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.HasSuffix(s.C(FieldRepresentative), v))
	})
}

// RepresentativeIsNil applies the IsNil predicate on the "representative" field.
func RepresentativeIsNil() predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.IsNull(s.C(FieldRepresentative)))
	})
}

// RepresentativeNotNil applies the NotNil predicate on the "representative" field.
func RepresentativeNotNil() predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NotNull(s.C(FieldRepresentative)))
	})
}

// RepresentativeEqualFold applies the EqualFold predicate on the "representative" field.
func RepresentativeEqualFold(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EqualFold(s.C(FieldRepresentative), v))
	})
}

// RepresentativeContainsFold applies the ContainsFold predicate on the "representative" field.
func RepresentativeContainsFold(v string) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.ContainsFold(s.C(FieldRepresentative), v))
	})
}

// EncryptedEQ applies the EQ predicate on the "encrypted" field.
func EncryptedEQ(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldEncrypted), v))
	})
}

// EncryptedNEQ applies the NEQ predicate on the "encrypted" field.
func EncryptedNEQ(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldEncrypted), v))
	})
}

// WorkEQ applies the EQ predicate on the "work" field.
func WorkEQ(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldWork), v))
	})
}

// WorkNEQ applies the NEQ predicate on the "work" field.
func WorkNEQ(v bool) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldWork), v))
	})
}

// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.EQ(s.C(FieldCreatedAt), v))
	})
}

// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NEQ(s.C(FieldCreatedAt), v))
	})
}

// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.In(s.C(FieldCreatedAt), v...))
	})
}

// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Wallet {
	v := make([]interface{}, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.NotIn(s.C(FieldCreatedAt), v...))
	})
}

// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GT(s.C(FieldCreatedAt), v))
	})
}

// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.GTE(s.C(FieldCreatedAt), v))
	})
}

// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LT(s.C(FieldCreatedAt), v))
	})
}

// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		s.Where(sql.LTE(s.C(FieldCreatedAt), v))
	})
}

// HasAccounts applies the HasEdge predicate on the "accounts" edge.
func HasAccounts() predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(AccountsTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, AccountsTable, AccountsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasAccountsWith applies the HasEdge predicate on the "accounts" edge with a given conditions (other predicates).
func HasAccountsWith(preds ...predicate.Account) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(AccountsInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, AccountsTable, AccountsColumn),
		)
		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.Wallet) predicate.Wallet {
	return predicate.Wallet(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.Wallet) predicate.Wallet {
	return predicate.Wallet(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.Wallet) predicate.Wallet {
	return predicate.Wallet(func(s *sql.Selector) {
		p(s.Not())
	})
}
