TinySkin/db/ent/user/where.go
2023-09-03 17:00:10 +08:00

479 lines
15 KiB
Go

// Code generated by ent, DO NOT EDIT.
package user
import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/xmdhs/authlib-skin/db/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.User {
return predicate.User(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.User {
return predicate.User(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.User {
return predicate.User(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.User {
return predicate.User(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.User {
return predicate.User(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.User {
return predicate.User(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.User {
return predicate.User(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.User {
return predicate.User(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.User {
return predicate.User(sql.FieldLTE(FieldID, id))
}
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func Email(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldEmail, v))
}
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func Password(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))
}
// Salt applies equality check predicate on the "salt" field. It's identical to SaltEQ.
func Salt(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldSalt, v))
}
// State applies equality check predicate on the "state" field. It's identical to StateEQ.
func State(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldState, v))
}
// RegTime applies equality check predicate on the "reg_time" field. It's identical to RegTimeEQ.
func RegTime(v int64) predicate.User {
return predicate.User(sql.FieldEQ(FieldRegTime, v))
}
// EmailEQ applies the EQ predicate on the "email" field.
func EmailEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldEmail, v))
}
// EmailNEQ applies the NEQ predicate on the "email" field.
func EmailNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldEmail, v))
}
// EmailIn applies the In predicate on the "email" field.
func EmailIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldEmail, vs...))
}
// EmailNotIn applies the NotIn predicate on the "email" field.
func EmailNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldEmail, vs...))
}
// EmailGT applies the GT predicate on the "email" field.
func EmailGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldEmail, v))
}
// EmailGTE applies the GTE predicate on the "email" field.
func EmailGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldEmail, v))
}
// EmailLT applies the LT predicate on the "email" field.
func EmailLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldEmail, v))
}
// EmailLTE applies the LTE predicate on the "email" field.
func EmailLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldEmail, v))
}
// EmailContains applies the Contains predicate on the "email" field.
func EmailContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldEmail, v))
}
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldEmail, v))
}
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldEmail, v))
}
// EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldEmail, v))
}
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldEmail, v))
}
// PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))
}
// PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldPassword, v))
}
// PasswordIn applies the In predicate on the "password" field.
func PasswordIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldPassword, vs...))
}
// PasswordNotIn applies the NotIn predicate on the "password" field.
func PasswordNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldPassword, vs...))
}
// PasswordGT applies the GT predicate on the "password" field.
func PasswordGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldPassword, v))
}
// PasswordGTE applies the GTE predicate on the "password" field.
func PasswordGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldPassword, v))
}
// PasswordLT applies the LT predicate on the "password" field.
func PasswordLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldPassword, v))
}
// PasswordLTE applies the LTE predicate on the "password" field.
func PasswordLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldPassword, v))
}
// PasswordContains applies the Contains predicate on the "password" field.
func PasswordContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldPassword, v))
}
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldPassword, v))
}
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldPassword, v))
}
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldPassword, v))
}
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldPassword, v))
}
// SaltEQ applies the EQ predicate on the "salt" field.
func SaltEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldSalt, v))
}
// SaltNEQ applies the NEQ predicate on the "salt" field.
func SaltNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldSalt, v))
}
// SaltIn applies the In predicate on the "salt" field.
func SaltIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldSalt, vs...))
}
// SaltNotIn applies the NotIn predicate on the "salt" field.
func SaltNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldSalt, vs...))
}
// SaltGT applies the GT predicate on the "salt" field.
func SaltGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldSalt, v))
}
// SaltGTE applies the GTE predicate on the "salt" field.
func SaltGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldSalt, v))
}
// SaltLT applies the LT predicate on the "salt" field.
func SaltLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldSalt, v))
}
// SaltLTE applies the LTE predicate on the "salt" field.
func SaltLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldSalt, v))
}
// SaltContains applies the Contains predicate on the "salt" field.
func SaltContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldSalt, v))
}
// SaltHasPrefix applies the HasPrefix predicate on the "salt" field.
func SaltHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldSalt, v))
}
// SaltHasSuffix applies the HasSuffix predicate on the "salt" field.
func SaltHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldSalt, v))
}
// SaltEqualFold applies the EqualFold predicate on the "salt" field.
func SaltEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldSalt, v))
}
// SaltContainsFold applies the ContainsFold predicate on the "salt" field.
func SaltContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldSalt, v))
}
// StateEQ applies the EQ predicate on the "state" field.
func StateEQ(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldState, v))
}
// StateNEQ applies the NEQ predicate on the "state" field.
func StateNEQ(v int) predicate.User {
return predicate.User(sql.FieldNEQ(FieldState, v))
}
// StateIn applies the In predicate on the "state" field.
func StateIn(vs ...int) predicate.User {
return predicate.User(sql.FieldIn(FieldState, vs...))
}
// StateNotIn applies the NotIn predicate on the "state" field.
func StateNotIn(vs ...int) predicate.User {
return predicate.User(sql.FieldNotIn(FieldState, vs...))
}
// StateGT applies the GT predicate on the "state" field.
func StateGT(v int) predicate.User {
return predicate.User(sql.FieldGT(FieldState, v))
}
// StateGTE applies the GTE predicate on the "state" field.
func StateGTE(v int) predicate.User {
return predicate.User(sql.FieldGTE(FieldState, v))
}
// StateLT applies the LT predicate on the "state" field.
func StateLT(v int) predicate.User {
return predicate.User(sql.FieldLT(FieldState, v))
}
// StateLTE applies the LTE predicate on the "state" field.
func StateLTE(v int) predicate.User {
return predicate.User(sql.FieldLTE(FieldState, v))
}
// RegTimeEQ applies the EQ predicate on the "reg_time" field.
func RegTimeEQ(v int64) predicate.User {
return predicate.User(sql.FieldEQ(FieldRegTime, v))
}
// RegTimeNEQ applies the NEQ predicate on the "reg_time" field.
func RegTimeNEQ(v int64) predicate.User {
return predicate.User(sql.FieldNEQ(FieldRegTime, v))
}
// RegTimeIn applies the In predicate on the "reg_time" field.
func RegTimeIn(vs ...int64) predicate.User {
return predicate.User(sql.FieldIn(FieldRegTime, vs...))
}
// RegTimeNotIn applies the NotIn predicate on the "reg_time" field.
func RegTimeNotIn(vs ...int64) predicate.User {
return predicate.User(sql.FieldNotIn(FieldRegTime, vs...))
}
// RegTimeGT applies the GT predicate on the "reg_time" field.
func RegTimeGT(v int64) predicate.User {
return predicate.User(sql.FieldGT(FieldRegTime, v))
}
// RegTimeGTE applies the GTE predicate on the "reg_time" field.
func RegTimeGTE(v int64) predicate.User {
return predicate.User(sql.FieldGTE(FieldRegTime, v))
}
// RegTimeLT applies the LT predicate on the "reg_time" field.
func RegTimeLT(v int64) predicate.User {
return predicate.User(sql.FieldLT(FieldRegTime, v))
}
// RegTimeLTE applies the LTE predicate on the "reg_time" field.
func RegTimeLTE(v int64) predicate.User {
return predicate.User(sql.FieldLTE(FieldRegTime, v))
}
// HasCreatedSkin applies the HasEdge predicate on the "created_skin" edge.
func HasCreatedSkin() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, true, CreatedSkinTable, CreatedSkinColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasCreatedSkinWith applies the HasEdge predicate on the "created_skin" edge with a given conditions (other predicates).
func HasCreatedSkinWith(preds ...predicate.Skin) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newCreatedSkinStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasProfile applies the HasEdge predicate on the "profile" edge.
func HasProfile() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2O, false, ProfileTable, ProfileColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasProfileWith applies the HasEdge predicate on the "profile" edge with a given conditions (other predicates).
func HasProfileWith(preds ...predicate.UserProfile) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newProfileStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasToken applies the HasEdge predicate on the "token" edge.
func HasToken() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, TokenTable, TokenColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasTokenWith applies the HasEdge predicate on the "token" edge with a given conditions (other predicates).
func HasTokenWith(preds ...predicate.UserToken) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newTokenStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasSkin applies the HasEdge predicate on the "skin" edge.
func HasSkin() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, SkinTable, SkinColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasSkinWith applies the HasEdge predicate on the "skin" edge with a given conditions (other predicates).
func HasSkinWith(preds ...predicate.Skin) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newSkinStep()
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.User) predicate.User {
return predicate.User(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.User) predicate.User {
return predicate.User(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.User) predicate.User {
return predicate.User(func(s *sql.Selector) {
p(s.Not())
})
}