// Code generated by ent, DO NOT EDIT. package authroles import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "github.com/hay-kot/homebox/backend/internal/data/ent/predicate" ) // ID filters vertices based on their ID field. func ID(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldEQ(FieldID, id)) } // IDEQ applies the EQ predicate on the ID field. func IDEQ(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldEQ(FieldID, id)) } // IDNEQ applies the NEQ predicate on the ID field. func IDNEQ(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldNEQ(FieldID, id)) } // IDIn applies the In predicate on the ID field. func IDIn(ids ...int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldIn(FieldID, ids...)) } // IDNotIn applies the NotIn predicate on the ID field. func IDNotIn(ids ...int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldNotIn(FieldID, ids...)) } // IDGT applies the GT predicate on the ID field. func IDGT(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldGT(FieldID, id)) } // IDGTE applies the GTE predicate on the ID field. func IDGTE(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldGTE(FieldID, id)) } // IDLT applies the LT predicate on the ID field. func IDLT(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldLT(FieldID, id)) } // IDLTE applies the LTE predicate on the ID field. func IDLTE(id int) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldLTE(FieldID, id)) } // RoleEQ applies the EQ predicate on the "role" field. func RoleEQ(v Role) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldEQ(FieldRole, v)) } // RoleNEQ applies the NEQ predicate on the "role" field. func RoleNEQ(v Role) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldNEQ(FieldRole, v)) } // RoleIn applies the In predicate on the "role" field. func RoleIn(vs ...Role) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldIn(FieldRole, vs...)) } // RoleNotIn applies the NotIn predicate on the "role" field. func RoleNotIn(vs ...Role) predicate.AuthRoles { return predicate.AuthRoles(sql.FieldNotIn(FieldRole, vs...)) } // HasToken applies the HasEdge predicate on the "token" edge. func HasToken() predicate.AuthRoles { return predicate.AuthRoles(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, 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.AuthTokens) predicate.AuthRoles { return predicate.AuthRoles(func(s *sql.Selector) { step := newTokenStep() 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.AuthRoles) predicate.AuthRoles { return predicate.AuthRoles(sql.AndPredicates(predicates...)) } // Or groups predicates with the OR operator between them. func Or(predicates ...predicate.AuthRoles) predicate.AuthRoles { return predicate.AuthRoles(sql.OrPredicates(predicates...)) } // Not applies the not operator on the given predicate. func Not(p predicate.AuthRoles) predicate.AuthRoles { return predicate.AuthRoles(sql.NotPredicates(p)) }