mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 23:03:57 +08:00
167 lines
5.2 KiB
Go
167 lines
5.2 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package adminrole
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"github.com/chaitin/MonkeyCode/backend/db/predicate"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// AdminID applies equality check predicate on the "admin_id" field. It's identical to AdminIDEQ.
|
|
func AdminID(v uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldAdminID, v))
|
|
}
|
|
|
|
// RoleID applies equality check predicate on the "role_id" field. It's identical to RoleIDEQ.
|
|
func RoleID(v int64) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldRoleID, v))
|
|
}
|
|
|
|
// AdminIDEQ applies the EQ predicate on the "admin_id" field.
|
|
func AdminIDEQ(v uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldAdminID, v))
|
|
}
|
|
|
|
// AdminIDNEQ applies the NEQ predicate on the "admin_id" field.
|
|
func AdminIDNEQ(v uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNEQ(FieldAdminID, v))
|
|
}
|
|
|
|
// AdminIDIn applies the In predicate on the "admin_id" field.
|
|
func AdminIDIn(vs ...uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldIn(FieldAdminID, vs...))
|
|
}
|
|
|
|
// AdminIDNotIn applies the NotIn predicate on the "admin_id" field.
|
|
func AdminIDNotIn(vs ...uuid.UUID) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNotIn(FieldAdminID, vs...))
|
|
}
|
|
|
|
// RoleIDEQ applies the EQ predicate on the "role_id" field.
|
|
func RoleIDEQ(v int64) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldEQ(FieldRoleID, v))
|
|
}
|
|
|
|
// RoleIDNEQ applies the NEQ predicate on the "role_id" field.
|
|
func RoleIDNEQ(v int64) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNEQ(FieldRoleID, v))
|
|
}
|
|
|
|
// RoleIDIn applies the In predicate on the "role_id" field.
|
|
func RoleIDIn(vs ...int64) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldIn(FieldRoleID, vs...))
|
|
}
|
|
|
|
// RoleIDNotIn applies the NotIn predicate on the "role_id" field.
|
|
func RoleIDNotIn(vs ...int64) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.FieldNotIn(FieldRoleID, vs...))
|
|
}
|
|
|
|
// HasAdmin applies the HasEdge predicate on the "admin" edge.
|
|
func HasAdmin() predicate.AdminRole {
|
|
return predicate.AdminRole(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, AdminTable, AdminColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasAdminWith applies the HasEdge predicate on the "admin" edge with a given conditions (other predicates).
|
|
func HasAdminWith(preds ...predicate.Admin) predicate.AdminRole {
|
|
return predicate.AdminRole(func(s *sql.Selector) {
|
|
step := newAdminStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasRole applies the HasEdge predicate on the "role" edge.
|
|
func HasRole() predicate.AdminRole {
|
|
return predicate.AdminRole(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, RoleTable, RoleColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasRoleWith applies the HasEdge predicate on the "role" edge with a given conditions (other predicates).
|
|
func HasRoleWith(preds ...predicate.Role) predicate.AdminRole {
|
|
return predicate.AdminRole(func(s *sql.Selector) {
|
|
step := newRoleStep()
|
|
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.AdminRole) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.AdminRole) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.AdminRole) predicate.AdminRole {
|
|
return predicate.AdminRole(sql.NotPredicates(p))
|
|
}
|