// Code generated by ent, DO NOT EDIT.

package preimageshare

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/google/uuid"
	"github.com/lightsparkdev/spark/common/keys"
	"github.com/lightsparkdev/spark/so/ent/predicate"
)

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

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

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

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

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

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

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

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

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

// CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTime(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldCreateTime, v))
}

// UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTime(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldUpdateTime, v))
}

// PaymentHash applies equality check predicate on the "payment_hash" field. It's identical to PaymentHashEQ.
func PaymentHash(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldPaymentHash, v))
}

// PreimageShare applies equality check predicate on the "preimage_share" field. It's identical to PreimageShareEQ.
func PreimageShare(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldPreimageShare, v))
}

// Threshold applies equality check predicate on the "threshold" field. It's identical to ThresholdEQ.
func Threshold(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldThreshold, v))
}

// OwnerIdentityPubkey applies equality check predicate on the "owner_identity_pubkey" field. It's identical to OwnerIdentityPubkeyEQ.
func OwnerIdentityPubkey(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldOwnerIdentityPubkey, v))
}

// InvoiceString applies equality check predicate on the "invoice_string" field. It's identical to InvoiceStringEQ.
func InvoiceString(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldInvoiceString, v))
}

// CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeEQ(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldCreateTime, v))
}

// CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNEQ(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldCreateTime, v))
}

// CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeIn(vs ...time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldCreateTime, vs...))
}

// CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func CreateTimeNotIn(vs ...time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldCreateTime, vs...))
}

// CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGT(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldCreateTime, v))
}

// CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeGTE(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldCreateTime, v))
}

// CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLT(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldCreateTime, v))
}

// CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeLTE(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldCreateTime, v))
}

// UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeEQ(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldUpdateTime, v))
}

// UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNEQ(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldUpdateTime, v))
}

// UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeIn(vs ...time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldUpdateTime, vs...))
}

// UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
func UpdateTimeNotIn(vs ...time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldUpdateTime, vs...))
}

// UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGT(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldUpdateTime, v))
}

// UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeGTE(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldUpdateTime, v))
}

// UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLT(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldUpdateTime, v))
}

// UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeLTE(v time.Time) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldUpdateTime, v))
}

// PaymentHashEQ applies the EQ predicate on the "payment_hash" field.
func PaymentHashEQ(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldPaymentHash, v))
}

// PaymentHashNEQ applies the NEQ predicate on the "payment_hash" field.
func PaymentHashNEQ(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldPaymentHash, v))
}

// PaymentHashIn applies the In predicate on the "payment_hash" field.
func PaymentHashIn(vs ...[]byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldPaymentHash, vs...))
}

// PaymentHashNotIn applies the NotIn predicate on the "payment_hash" field.
func PaymentHashNotIn(vs ...[]byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldPaymentHash, vs...))
}

// PaymentHashGT applies the GT predicate on the "payment_hash" field.
func PaymentHashGT(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldPaymentHash, v))
}

// PaymentHashGTE applies the GTE predicate on the "payment_hash" field.
func PaymentHashGTE(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldPaymentHash, v))
}

// PaymentHashLT applies the LT predicate on the "payment_hash" field.
func PaymentHashLT(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldPaymentHash, v))
}

// PaymentHashLTE applies the LTE predicate on the "payment_hash" field.
func PaymentHashLTE(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldPaymentHash, v))
}

// PreimageShareEQ applies the EQ predicate on the "preimage_share" field.
func PreimageShareEQ(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldPreimageShare, v))
}

// PreimageShareNEQ applies the NEQ predicate on the "preimage_share" field.
func PreimageShareNEQ(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldPreimageShare, v))
}

// PreimageShareIn applies the In predicate on the "preimage_share" field.
func PreimageShareIn(vs ...[]byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldPreimageShare, vs...))
}

// PreimageShareNotIn applies the NotIn predicate on the "preimage_share" field.
func PreimageShareNotIn(vs ...[]byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldPreimageShare, vs...))
}

// PreimageShareGT applies the GT predicate on the "preimage_share" field.
func PreimageShareGT(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldPreimageShare, v))
}

// PreimageShareGTE applies the GTE predicate on the "preimage_share" field.
func PreimageShareGTE(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldPreimageShare, v))
}

// PreimageShareLT applies the LT predicate on the "preimage_share" field.
func PreimageShareLT(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldPreimageShare, v))
}

// PreimageShareLTE applies the LTE predicate on the "preimage_share" field.
func PreimageShareLTE(v []byte) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldPreimageShare, v))
}

// ThresholdEQ applies the EQ predicate on the "threshold" field.
func ThresholdEQ(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldThreshold, v))
}

// ThresholdNEQ applies the NEQ predicate on the "threshold" field.
func ThresholdNEQ(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldThreshold, v))
}

// ThresholdIn applies the In predicate on the "threshold" field.
func ThresholdIn(vs ...int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldThreshold, vs...))
}

// ThresholdNotIn applies the NotIn predicate on the "threshold" field.
func ThresholdNotIn(vs ...int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldThreshold, vs...))
}

// ThresholdGT applies the GT predicate on the "threshold" field.
func ThresholdGT(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldThreshold, v))
}

// ThresholdGTE applies the GTE predicate on the "threshold" field.
func ThresholdGTE(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldThreshold, v))
}

// ThresholdLT applies the LT predicate on the "threshold" field.
func ThresholdLT(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldThreshold, v))
}

// ThresholdLTE applies the LTE predicate on the "threshold" field.
func ThresholdLTE(v int32) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldThreshold, v))
}

// OwnerIdentityPubkeyEQ applies the EQ predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyEQ(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldOwnerIdentityPubkey, v))
}

// OwnerIdentityPubkeyNEQ applies the NEQ predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyNEQ(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldOwnerIdentityPubkey, v))
}

// OwnerIdentityPubkeyIn applies the In predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyIn(vs ...keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldOwnerIdentityPubkey, vs...))
}

// OwnerIdentityPubkeyNotIn applies the NotIn predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyNotIn(vs ...keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldOwnerIdentityPubkey, vs...))
}

// OwnerIdentityPubkeyGT applies the GT predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyGT(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldOwnerIdentityPubkey, v))
}

// OwnerIdentityPubkeyGTE applies the GTE predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyGTE(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldOwnerIdentityPubkey, v))
}

// OwnerIdentityPubkeyLT applies the LT predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyLT(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldOwnerIdentityPubkey, v))
}

// OwnerIdentityPubkeyLTE applies the LTE predicate on the "owner_identity_pubkey" field.
func OwnerIdentityPubkeyLTE(v keys.Public) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldOwnerIdentityPubkey, v))
}

// InvoiceStringEQ applies the EQ predicate on the "invoice_string" field.
func InvoiceStringEQ(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEQ(FieldInvoiceString, v))
}

// InvoiceStringNEQ applies the NEQ predicate on the "invoice_string" field.
func InvoiceStringNEQ(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNEQ(FieldInvoiceString, v))
}

// InvoiceStringIn applies the In predicate on the "invoice_string" field.
func InvoiceStringIn(vs ...string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldIn(FieldInvoiceString, vs...))
}

// InvoiceStringNotIn applies the NotIn predicate on the "invoice_string" field.
func InvoiceStringNotIn(vs ...string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldNotIn(FieldInvoiceString, vs...))
}

// InvoiceStringGT applies the GT predicate on the "invoice_string" field.
func InvoiceStringGT(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGT(FieldInvoiceString, v))
}

// InvoiceStringGTE applies the GTE predicate on the "invoice_string" field.
func InvoiceStringGTE(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldGTE(FieldInvoiceString, v))
}

// InvoiceStringLT applies the LT predicate on the "invoice_string" field.
func InvoiceStringLT(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLT(FieldInvoiceString, v))
}

// InvoiceStringLTE applies the LTE predicate on the "invoice_string" field.
func InvoiceStringLTE(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldLTE(FieldInvoiceString, v))
}

// InvoiceStringContains applies the Contains predicate on the "invoice_string" field.
func InvoiceStringContains(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldContains(FieldInvoiceString, v))
}

// InvoiceStringHasPrefix applies the HasPrefix predicate on the "invoice_string" field.
func InvoiceStringHasPrefix(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldHasPrefix(FieldInvoiceString, v))
}

// InvoiceStringHasSuffix applies the HasSuffix predicate on the "invoice_string" field.
func InvoiceStringHasSuffix(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldHasSuffix(FieldInvoiceString, v))
}

// InvoiceStringEqualFold applies the EqualFold predicate on the "invoice_string" field.
func InvoiceStringEqualFold(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldEqualFold(FieldInvoiceString, v))
}

// InvoiceStringContainsFold applies the ContainsFold predicate on the "invoice_string" field.
func InvoiceStringContainsFold(v string) predicate.PreimageShare {
	return predicate.PreimageShare(sql.FieldContainsFold(FieldInvoiceString, v))
}

// HasPreimageRequest applies the HasEdge predicate on the "preimage_request" edge.
func HasPreimageRequest() predicate.PreimageShare {
	return predicate.PreimageShare(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, PreimageRequestTable, PreimageRequestColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasPreimageRequestWith applies the HasEdge predicate on the "preimage_request" edge with a given conditions (other predicates).
func HasPreimageRequestWith(preds ...predicate.PreimageRequest) predicate.PreimageShare {
	return predicate.PreimageShare(func(s *sql.Selector) {
		step := newPreimageRequestStep()
		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.PreimageShare) predicate.PreimageShare {
	return predicate.PreimageShare(sql.AndPredicates(predicates...))
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PreimageShare) predicate.PreimageShare {
	return predicate.PreimageShare(sql.OrPredicates(predicates...))
}

// Not applies the not operator on the given predicate.
func Not(p predicate.PreimageShare) predicate.PreimageShare {
	return predicate.PreimageShare(sql.NotPredicates(p))
}
