// Code generated by ent, DO NOT EDIT.

package transfer

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"
	"github.com/lightsparkdev/spark/so/ent/schema/schematype"
)

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

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

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

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

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

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

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

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

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.Transfer {
	return predicate.Transfer(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.Transfer {
	return predicate.Transfer(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.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldUpdateTime, v))
}

// SenderIdentityPubkey applies equality check predicate on the "sender_identity_pubkey" field. It's identical to SenderIdentityPubkeyEQ.
func SenderIdentityPubkey(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldSenderIdentityPubkey, v))
}

// ReceiverIdentityPubkey applies equality check predicate on the "receiver_identity_pubkey" field. It's identical to ReceiverIdentityPubkeyEQ.
func ReceiverIdentityPubkey(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldReceiverIdentityPubkey, v))
}

// TotalValue applies equality check predicate on the "total_value" field. It's identical to TotalValueEQ.
func TotalValue(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldTotalValue, v))
}

// ExpiryTime applies equality check predicate on the "expiry_time" field. It's identical to ExpiryTimeEQ.
func ExpiryTime(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldExpiryTime, v))
}

// CompletionTime applies equality check predicate on the "completion_time" field. It's identical to CompletionTimeEQ.
func CompletionTime(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldCompletionTime, v))
}

// SparkInvoiceID applies equality check predicate on the "spark_invoice_id" field. It's identical to SparkInvoiceIDEQ.
func SparkInvoiceID(v uuid.UUID) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldSparkInvoiceID, v))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SenderIdentityPubkeyEQ applies the EQ predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyEQ(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldSenderIdentityPubkey, v))
}

// SenderIdentityPubkeyNEQ applies the NEQ predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyNEQ(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldSenderIdentityPubkey, v))
}

// SenderIdentityPubkeyIn applies the In predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyIn(vs ...keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldSenderIdentityPubkey, vs...))
}

// SenderIdentityPubkeyNotIn applies the NotIn predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyNotIn(vs ...keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldSenderIdentityPubkey, vs...))
}

// SenderIdentityPubkeyGT applies the GT predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyGT(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldGT(FieldSenderIdentityPubkey, v))
}

// SenderIdentityPubkeyGTE applies the GTE predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyGTE(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldGTE(FieldSenderIdentityPubkey, v))
}

// SenderIdentityPubkeyLT applies the LT predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyLT(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldLT(FieldSenderIdentityPubkey, v))
}

// SenderIdentityPubkeyLTE applies the LTE predicate on the "sender_identity_pubkey" field.
func SenderIdentityPubkeyLTE(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldLTE(FieldSenderIdentityPubkey, v))
}

// ReceiverIdentityPubkeyEQ applies the EQ predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyEQ(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldReceiverIdentityPubkey, v))
}

// ReceiverIdentityPubkeyNEQ applies the NEQ predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyNEQ(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldReceiverIdentityPubkey, v))
}

// ReceiverIdentityPubkeyIn applies the In predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyIn(vs ...keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldReceiverIdentityPubkey, vs...))
}

// ReceiverIdentityPubkeyNotIn applies the NotIn predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyNotIn(vs ...keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldReceiverIdentityPubkey, vs...))
}

// ReceiverIdentityPubkeyGT applies the GT predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyGT(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldGT(FieldReceiverIdentityPubkey, v))
}

// ReceiverIdentityPubkeyGTE applies the GTE predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyGTE(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldGTE(FieldReceiverIdentityPubkey, v))
}

// ReceiverIdentityPubkeyLT applies the LT predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyLT(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldLT(FieldReceiverIdentityPubkey, v))
}

// ReceiverIdentityPubkeyLTE applies the LTE predicate on the "receiver_identity_pubkey" field.
func ReceiverIdentityPubkeyLTE(v keys.Public) predicate.Transfer {
	return predicate.Transfer(sql.FieldLTE(FieldReceiverIdentityPubkey, v))
}

// TotalValueEQ applies the EQ predicate on the "total_value" field.
func TotalValueEQ(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldTotalValue, v))
}

// TotalValueNEQ applies the NEQ predicate on the "total_value" field.
func TotalValueNEQ(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldTotalValue, v))
}

// TotalValueIn applies the In predicate on the "total_value" field.
func TotalValueIn(vs ...uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldTotalValue, vs...))
}

// TotalValueNotIn applies the NotIn predicate on the "total_value" field.
func TotalValueNotIn(vs ...uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldTotalValue, vs...))
}

// TotalValueGT applies the GT predicate on the "total_value" field.
func TotalValueGT(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldGT(FieldTotalValue, v))
}

// TotalValueGTE applies the GTE predicate on the "total_value" field.
func TotalValueGTE(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldGTE(FieldTotalValue, v))
}

// TotalValueLT applies the LT predicate on the "total_value" field.
func TotalValueLT(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldLT(FieldTotalValue, v))
}

// TotalValueLTE applies the LTE predicate on the "total_value" field.
func TotalValueLTE(v uint64) predicate.Transfer {
	return predicate.Transfer(sql.FieldLTE(FieldTotalValue, v))
}

// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v schematype.TransferStatus) predicate.Transfer {
	vc := v
	return predicate.Transfer(sql.FieldEQ(FieldStatus, vc))
}

// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v schematype.TransferStatus) predicate.Transfer {
	vc := v
	return predicate.Transfer(sql.FieldNEQ(FieldStatus, vc))
}

// StatusIn applies the In predicate on the "status" field.
func StatusIn(vs ...schematype.TransferStatus) predicate.Transfer {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Transfer(sql.FieldIn(FieldStatus, v...))
}

// StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotIn(vs ...schematype.TransferStatus) predicate.Transfer {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Transfer(sql.FieldNotIn(FieldStatus, v...))
}

// TypeEQ applies the EQ predicate on the "type" field.
func TypeEQ(v schematype.TransferType) predicate.Transfer {
	vc := v
	return predicate.Transfer(sql.FieldEQ(FieldType, vc))
}

// TypeNEQ applies the NEQ predicate on the "type" field.
func TypeNEQ(v schematype.TransferType) predicate.Transfer {
	vc := v
	return predicate.Transfer(sql.FieldNEQ(FieldType, vc))
}

// TypeIn applies the In predicate on the "type" field.
func TypeIn(vs ...schematype.TransferType) predicate.Transfer {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Transfer(sql.FieldIn(FieldType, v...))
}

// TypeNotIn applies the NotIn predicate on the "type" field.
func TypeNotIn(vs ...schematype.TransferType) predicate.Transfer {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Transfer(sql.FieldNotIn(FieldType, v...))
}

// ExpiryTimeEQ applies the EQ predicate on the "expiry_time" field.
func ExpiryTimeEQ(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldExpiryTime, v))
}

// ExpiryTimeNEQ applies the NEQ predicate on the "expiry_time" field.
func ExpiryTimeNEQ(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldExpiryTime, v))
}

// ExpiryTimeIn applies the In predicate on the "expiry_time" field.
func ExpiryTimeIn(vs ...time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldExpiryTime, vs...))
}

// ExpiryTimeNotIn applies the NotIn predicate on the "expiry_time" field.
func ExpiryTimeNotIn(vs ...time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldExpiryTime, vs...))
}

// ExpiryTimeGT applies the GT predicate on the "expiry_time" field.
func ExpiryTimeGT(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldGT(FieldExpiryTime, v))
}

// ExpiryTimeGTE applies the GTE predicate on the "expiry_time" field.
func ExpiryTimeGTE(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldGTE(FieldExpiryTime, v))
}

// ExpiryTimeLT applies the LT predicate on the "expiry_time" field.
func ExpiryTimeLT(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldLT(FieldExpiryTime, v))
}

// ExpiryTimeLTE applies the LTE predicate on the "expiry_time" field.
func ExpiryTimeLTE(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldLTE(FieldExpiryTime, v))
}

// CompletionTimeEQ applies the EQ predicate on the "completion_time" field.
func CompletionTimeEQ(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldCompletionTime, v))
}

// CompletionTimeNEQ applies the NEQ predicate on the "completion_time" field.
func CompletionTimeNEQ(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldCompletionTime, v))
}

// CompletionTimeIn applies the In predicate on the "completion_time" field.
func CompletionTimeIn(vs ...time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldCompletionTime, vs...))
}

// CompletionTimeNotIn applies the NotIn predicate on the "completion_time" field.
func CompletionTimeNotIn(vs ...time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldCompletionTime, vs...))
}

// CompletionTimeGT applies the GT predicate on the "completion_time" field.
func CompletionTimeGT(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldGT(FieldCompletionTime, v))
}

// CompletionTimeGTE applies the GTE predicate on the "completion_time" field.
func CompletionTimeGTE(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldGTE(FieldCompletionTime, v))
}

// CompletionTimeLT applies the LT predicate on the "completion_time" field.
func CompletionTimeLT(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldLT(FieldCompletionTime, v))
}

// CompletionTimeLTE applies the LTE predicate on the "completion_time" field.
func CompletionTimeLTE(v time.Time) predicate.Transfer {
	return predicate.Transfer(sql.FieldLTE(FieldCompletionTime, v))
}

// CompletionTimeIsNil applies the IsNil predicate on the "completion_time" field.
func CompletionTimeIsNil() predicate.Transfer {
	return predicate.Transfer(sql.FieldIsNull(FieldCompletionTime))
}

// CompletionTimeNotNil applies the NotNil predicate on the "completion_time" field.
func CompletionTimeNotNil() predicate.Transfer {
	return predicate.Transfer(sql.FieldNotNull(FieldCompletionTime))
}

// SparkInvoiceIDEQ applies the EQ predicate on the "spark_invoice_id" field.
func SparkInvoiceIDEQ(v uuid.UUID) predicate.Transfer {
	return predicate.Transfer(sql.FieldEQ(FieldSparkInvoiceID, v))
}

// SparkInvoiceIDNEQ applies the NEQ predicate on the "spark_invoice_id" field.
func SparkInvoiceIDNEQ(v uuid.UUID) predicate.Transfer {
	return predicate.Transfer(sql.FieldNEQ(FieldSparkInvoiceID, v))
}

// SparkInvoiceIDIn applies the In predicate on the "spark_invoice_id" field.
func SparkInvoiceIDIn(vs ...uuid.UUID) predicate.Transfer {
	return predicate.Transfer(sql.FieldIn(FieldSparkInvoiceID, vs...))
}

// SparkInvoiceIDNotIn applies the NotIn predicate on the "spark_invoice_id" field.
func SparkInvoiceIDNotIn(vs ...uuid.UUID) predicate.Transfer {
	return predicate.Transfer(sql.FieldNotIn(FieldSparkInvoiceID, vs...))
}

// SparkInvoiceIDIsNil applies the IsNil predicate on the "spark_invoice_id" field.
func SparkInvoiceIDIsNil() predicate.Transfer {
	return predicate.Transfer(sql.FieldIsNull(FieldSparkInvoiceID))
}

// SparkInvoiceIDNotNil applies the NotNil predicate on the "spark_invoice_id" field.
func SparkInvoiceIDNotNil() predicate.Transfer {
	return predicate.Transfer(sql.FieldNotNull(FieldSparkInvoiceID))
}

// HasTransferLeaves applies the HasEdge predicate on the "transfer_leaves" edge.
func HasTransferLeaves() predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, true, TransferLeavesTable, TransferLeavesColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasTransferLeavesWith applies the HasEdge predicate on the "transfer_leaves" edge with a given conditions (other predicates).
func HasTransferLeavesWith(preds ...predicate.TransferLeaf) predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := newTransferLeavesStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasPaymentIntent applies the HasEdge predicate on the "payment_intent" edge.
func HasPaymentIntent() predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, PaymentIntentTable, PaymentIntentColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasPaymentIntentWith applies the HasEdge predicate on the "payment_intent" edge with a given conditions (other predicates).
func HasPaymentIntentWith(preds ...predicate.PaymentIntent) predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := newPaymentIntentStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasSparkInvoice applies the HasEdge predicate on the "spark_invoice" edge.
func HasSparkInvoice() predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, SparkInvoiceTable, SparkInvoiceColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasSparkInvoiceWith applies the HasEdge predicate on the "spark_invoice" edge with a given conditions (other predicates).
func HasSparkInvoiceWith(preds ...predicate.SparkInvoice) predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := newSparkInvoiceStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasCounterSwapTransfer applies the HasEdge predicate on the "counter_swap_transfer" edge.
func HasCounterSwapTransfer() predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, CounterSwapTransferTable, CounterSwapTransferColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasCounterSwapTransferWith applies the HasEdge predicate on the "counter_swap_transfer" edge with a given conditions (other predicates).
func HasCounterSwapTransferWith(preds ...predicate.Transfer) predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := newCounterSwapTransferStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasPrimarySwapTransfer applies the HasEdge predicate on the "primary_swap_transfer" edge.
func HasPrimarySwapTransfer() predicate.Transfer {
	return predicate.Transfer(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, PrimarySwapTransferTable, PrimarySwapTransferColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

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

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