mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
314 lines
10 KiB
Go
314 lines
10 KiB
Go
|
|
// Code generated by ent, DO NOT EDIT.
|
||
|
|
|
||
|
|
package follow
|
||
|
|
|
||
|
|
import (
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"entgo.io/ent/dialect/sql"
|
||
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
||
|
|
"github.com/google/uuid"
|
||
|
|
"github.com/lysand-org/versia-go/ent/predicate"
|
||
|
|
)
|
||
|
|
|
||
|
|
// ID filters vertices based on their ID field.
|
||
|
|
func ID(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDEQ applies the EQ predicate on the ID field.
|
||
|
|
func IDEQ(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
||
|
|
func IDNEQ(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDIn applies the In predicate on the ID field.
|
||
|
|
func IDIn(ids ...uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldIn(FieldID, ids...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
||
|
|
func IDNotIn(ids ...uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNotIn(FieldID, ids...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDGT applies the GT predicate on the ID field.
|
||
|
|
func IDGT(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGT(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDGTE applies the GTE predicate on the ID field.
|
||
|
|
func IDGTE(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGTE(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDLT applies the LT predicate on the ID field.
|
||
|
|
func IDLT(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLT(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDLTE applies the LTE predicate on the ID field.
|
||
|
|
func IDLTE(id uuid.UUID) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLTE(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemote applies equality check predicate on the "isRemote" field. It's identical to IsRemoteEQ.
|
||
|
|
func IsRemote(v bool) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URI applies equality check predicate on the "uri" field. It's identical to URIEQ.
|
||
|
|
func URI(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||
|
|
func CreatedAt(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||
|
|
func UpdatedAt(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemoteEQ applies the EQ predicate on the "isRemote" field.
|
||
|
|
func IsRemoteEQ(v bool) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemoteNEQ applies the NEQ predicate on the "isRemote" field.
|
||
|
|
func IsRemoteNEQ(v bool) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIEQ applies the EQ predicate on the "uri" field.
|
||
|
|
func URIEQ(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URINEQ applies the NEQ predicate on the "uri" field.
|
||
|
|
func URINEQ(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIIn applies the In predicate on the "uri" field.
|
||
|
|
func URIIn(vs ...string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldIn(FieldURI, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URINotIn applies the NotIn predicate on the "uri" field.
|
||
|
|
func URINotIn(vs ...string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNotIn(FieldURI, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIGT applies the GT predicate on the "uri" field.
|
||
|
|
func URIGT(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGT(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIGTE applies the GTE predicate on the "uri" field.
|
||
|
|
func URIGTE(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGTE(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URILT applies the LT predicate on the "uri" field.
|
||
|
|
func URILT(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLT(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URILTE applies the LTE predicate on the "uri" field.
|
||
|
|
func URILTE(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLTE(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIContains applies the Contains predicate on the "uri" field.
|
||
|
|
func URIContains(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldContains(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIHasPrefix applies the HasPrefix predicate on the "uri" field.
|
||
|
|
func URIHasPrefix(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldHasPrefix(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIHasSuffix applies the HasSuffix predicate on the "uri" field.
|
||
|
|
func URIHasSuffix(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldHasSuffix(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIEqualFold applies the EqualFold predicate on the "uri" field.
|
||
|
|
func URIEqualFold(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEqualFold(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIContainsFold applies the ContainsFold predicate on the "uri" field.
|
||
|
|
func URIContainsFold(v string) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldContainsFold(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||
|
|
func CreatedAtEQ(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||
|
|
func CreatedAtNEQ(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||
|
|
func CreatedAtIn(vs ...time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldIn(FieldCreatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||
|
|
func CreatedAtGT(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGT(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||
|
|
func CreatedAtGTE(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGTE(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||
|
|
func CreatedAtLT(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLT(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||
|
|
func CreatedAtLTE(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLTE(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtEQ(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtNEQ(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldIn(FieldUpdatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtGT(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGT(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtGTE(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldGTE(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtLT(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLT(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtLTE(v time.Time) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldLTE(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// StatusEQ applies the EQ predicate on the "status" field.
|
||
|
|
func StatusEQ(v Status) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldEQ(FieldStatus, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||
|
|
func StatusNEQ(v Status) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNEQ(FieldStatus, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// StatusIn applies the In predicate on the "status" field.
|
||
|
|
func StatusIn(vs ...Status) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldIn(FieldStatus, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||
|
|
func StatusNotIn(vs ...Status) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.FieldNotIn(FieldStatus, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasFollower applies the HasEdge predicate on the "follower" edge.
|
||
|
|
func HasFollower() predicate.Follow {
|
||
|
|
return predicate.Follow(func(s *sql.Selector) {
|
||
|
|
step := sqlgraph.NewStep(
|
||
|
|
sqlgraph.From(Table, FieldID),
|
||
|
|
sqlgraph.Edge(sqlgraph.M2O, false, FollowerTable, FollowerColumn),
|
||
|
|
)
|
||
|
|
sqlgraph.HasNeighbors(s, step)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasFollowerWith applies the HasEdge predicate on the "follower" edge with a given conditions (other predicates).
|
||
|
|
func HasFollowerWith(preds ...predicate.User) predicate.Follow {
|
||
|
|
return predicate.Follow(func(s *sql.Selector) {
|
||
|
|
step := newFollowerStep()
|
||
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||
|
|
for _, p := range preds {
|
||
|
|
p(s)
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasFollowee applies the HasEdge predicate on the "followee" edge.
|
||
|
|
func HasFollowee() predicate.Follow {
|
||
|
|
return predicate.Follow(func(s *sql.Selector) {
|
||
|
|
step := sqlgraph.NewStep(
|
||
|
|
sqlgraph.From(Table, FieldID),
|
||
|
|
sqlgraph.Edge(sqlgraph.M2O, false, FolloweeTable, FolloweeColumn),
|
||
|
|
)
|
||
|
|
sqlgraph.HasNeighbors(s, step)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasFolloweeWith applies the HasEdge predicate on the "followee" edge with a given conditions (other predicates).
|
||
|
|
func HasFolloweeWith(preds ...predicate.User) predicate.Follow {
|
||
|
|
return predicate.Follow(func(s *sql.Selector) {
|
||
|
|
step := newFolloweeStep()
|
||
|
|
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.Follow) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.AndPredicates(predicates...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Or groups predicates with the OR operator between them.
|
||
|
|
func Or(predicates ...predicate.Follow) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.OrPredicates(predicates...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Not applies the not operator on the given predicate.
|
||
|
|
func Not(p predicate.Follow) predicate.Follow {
|
||
|
|
return predicate.Follow(sql.NotPredicates(p))
|
||
|
|
}
|