// Code generated by ent, DO NOT EDIT.

package utxo

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/google/uuid"
	"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.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldID, id))
}

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

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

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

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

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

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

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

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

// BlockHeight applies equality check predicate on the "block_height" field. It's identical to BlockHeightEQ.
func BlockHeight(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldBlockHeight, v))
}

// Txid applies equality check predicate on the "txid" field. It's identical to TxidEQ.
func Txid(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldTxid, v))
}

// Vout applies equality check predicate on the "vout" field. It's identical to VoutEQ.
func Vout(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldVout, v))
}

// Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.
func Amount(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldAmount, v))
}

// PkScript applies equality check predicate on the "pk_script" field. It's identical to PkScriptEQ.
func PkScript(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldPkScript, v))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// BlockHeightEQ applies the EQ predicate on the "block_height" field.
func BlockHeightEQ(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldBlockHeight, v))
}

// BlockHeightNEQ applies the NEQ predicate on the "block_height" field.
func BlockHeightNEQ(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldNEQ(FieldBlockHeight, v))
}

// BlockHeightIn applies the In predicate on the "block_height" field.
func BlockHeightIn(vs ...int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldIn(FieldBlockHeight, vs...))
}

// BlockHeightNotIn applies the NotIn predicate on the "block_height" field.
func BlockHeightNotIn(vs ...int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldNotIn(FieldBlockHeight, vs...))
}

// BlockHeightGT applies the GT predicate on the "block_height" field.
func BlockHeightGT(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldGT(FieldBlockHeight, v))
}

// BlockHeightGTE applies the GTE predicate on the "block_height" field.
func BlockHeightGTE(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldGTE(FieldBlockHeight, v))
}

// BlockHeightLT applies the LT predicate on the "block_height" field.
func BlockHeightLT(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldLT(FieldBlockHeight, v))
}

// BlockHeightLTE applies the LTE predicate on the "block_height" field.
func BlockHeightLTE(v int64) predicate.Utxo {
	return predicate.Utxo(sql.FieldLTE(FieldBlockHeight, v))
}

// TxidEQ applies the EQ predicate on the "txid" field.
func TxidEQ(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldTxid, v))
}

// TxidNEQ applies the NEQ predicate on the "txid" field.
func TxidNEQ(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldNEQ(FieldTxid, v))
}

// TxidIn applies the In predicate on the "txid" field.
func TxidIn(vs ...[]byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldIn(FieldTxid, vs...))
}

// TxidNotIn applies the NotIn predicate on the "txid" field.
func TxidNotIn(vs ...[]byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldNotIn(FieldTxid, vs...))
}

// TxidGT applies the GT predicate on the "txid" field.
func TxidGT(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldGT(FieldTxid, v))
}

// TxidGTE applies the GTE predicate on the "txid" field.
func TxidGTE(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldGTE(FieldTxid, v))
}

// TxidLT applies the LT predicate on the "txid" field.
func TxidLT(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldLT(FieldTxid, v))
}

// TxidLTE applies the LTE predicate on the "txid" field.
func TxidLTE(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldLTE(FieldTxid, v))
}

// VoutEQ applies the EQ predicate on the "vout" field.
func VoutEQ(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldVout, v))
}

// VoutNEQ applies the NEQ predicate on the "vout" field.
func VoutNEQ(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldNEQ(FieldVout, v))
}

// VoutIn applies the In predicate on the "vout" field.
func VoutIn(vs ...uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldIn(FieldVout, vs...))
}

// VoutNotIn applies the NotIn predicate on the "vout" field.
func VoutNotIn(vs ...uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldNotIn(FieldVout, vs...))
}

// VoutGT applies the GT predicate on the "vout" field.
func VoutGT(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldGT(FieldVout, v))
}

// VoutGTE applies the GTE predicate on the "vout" field.
func VoutGTE(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldGTE(FieldVout, v))
}

// VoutLT applies the LT predicate on the "vout" field.
func VoutLT(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldLT(FieldVout, v))
}

// VoutLTE applies the LTE predicate on the "vout" field.
func VoutLTE(v uint32) predicate.Utxo {
	return predicate.Utxo(sql.FieldLTE(FieldVout, v))
}

// AmountEQ applies the EQ predicate on the "amount" field.
func AmountEQ(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldAmount, v))
}

// AmountNEQ applies the NEQ predicate on the "amount" field.
func AmountNEQ(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldNEQ(FieldAmount, v))
}

// AmountIn applies the In predicate on the "amount" field.
func AmountIn(vs ...uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldIn(FieldAmount, vs...))
}

// AmountNotIn applies the NotIn predicate on the "amount" field.
func AmountNotIn(vs ...uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldNotIn(FieldAmount, vs...))
}

// AmountGT applies the GT predicate on the "amount" field.
func AmountGT(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldGT(FieldAmount, v))
}

// AmountGTE applies the GTE predicate on the "amount" field.
func AmountGTE(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldGTE(FieldAmount, v))
}

// AmountLT applies the LT predicate on the "amount" field.
func AmountLT(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldLT(FieldAmount, v))
}

// AmountLTE applies the LTE predicate on the "amount" field.
func AmountLTE(v uint64) predicate.Utxo {
	return predicate.Utxo(sql.FieldLTE(FieldAmount, v))
}

// NetworkEQ applies the EQ predicate on the "network" field.
func NetworkEQ(v schematype.Network) predicate.Utxo {
	vc := v
	return predicate.Utxo(sql.FieldEQ(FieldNetwork, vc))
}

// NetworkNEQ applies the NEQ predicate on the "network" field.
func NetworkNEQ(v schematype.Network) predicate.Utxo {
	vc := v
	return predicate.Utxo(sql.FieldNEQ(FieldNetwork, vc))
}

// NetworkIn applies the In predicate on the "network" field.
func NetworkIn(vs ...schematype.Network) predicate.Utxo {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Utxo(sql.FieldIn(FieldNetwork, v...))
}

// NetworkNotIn applies the NotIn predicate on the "network" field.
func NetworkNotIn(vs ...schematype.Network) predicate.Utxo {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.Utxo(sql.FieldNotIn(FieldNetwork, v...))
}

// PkScriptEQ applies the EQ predicate on the "pk_script" field.
func PkScriptEQ(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldEQ(FieldPkScript, v))
}

// PkScriptNEQ applies the NEQ predicate on the "pk_script" field.
func PkScriptNEQ(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldNEQ(FieldPkScript, v))
}

// PkScriptIn applies the In predicate on the "pk_script" field.
func PkScriptIn(vs ...[]byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldIn(FieldPkScript, vs...))
}

// PkScriptNotIn applies the NotIn predicate on the "pk_script" field.
func PkScriptNotIn(vs ...[]byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldNotIn(FieldPkScript, vs...))
}

// PkScriptGT applies the GT predicate on the "pk_script" field.
func PkScriptGT(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldGT(FieldPkScript, v))
}

// PkScriptGTE applies the GTE predicate on the "pk_script" field.
func PkScriptGTE(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldGTE(FieldPkScript, v))
}

// PkScriptLT applies the LT predicate on the "pk_script" field.
func PkScriptLT(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldLT(FieldPkScript, v))
}

// PkScriptLTE applies the LTE predicate on the "pk_script" field.
func PkScriptLTE(v []byte) predicate.Utxo {
	return predicate.Utxo(sql.FieldLTE(FieldPkScript, v))
}

// HasDepositAddress applies the HasEdge predicate on the "deposit_address" edge.
func HasDepositAddress() predicate.Utxo {
	return predicate.Utxo(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, DepositAddressTable, DepositAddressColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

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

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