mirror of
https://github.com/hanzoui/registry-backend.git
synced 2026-10-30 20:30:45 +00:00
288 lines
11 KiB
Go
288 lines
11 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package publisherpermission
|
|
|
|
import (
|
|
"registry-backend/ent/predicate"
|
|
"registry-backend/ent/schema"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
|
func UserID(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// PublisherID applies equality check predicate on the "publisher_id" field. It's identical to PublisherIDEQ.
|
|
func PublisherID(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldPublisherID, v))
|
|
}
|
|
|
|
// PermissionEQ applies the EQ predicate on the "permission" field.
|
|
func PermissionEQ(v schema.PublisherPermissionType) predicate.PublisherPermission {
|
|
vc := v
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldPermission, vc))
|
|
}
|
|
|
|
// PermissionNEQ applies the NEQ predicate on the "permission" field.
|
|
func PermissionNEQ(v schema.PublisherPermissionType) predicate.PublisherPermission {
|
|
vc := v
|
|
return predicate.PublisherPermission(sql.FieldNEQ(FieldPermission, vc))
|
|
}
|
|
|
|
// PermissionIn applies the In predicate on the "permission" field.
|
|
func PermissionIn(vs ...schema.PublisherPermissionType) predicate.PublisherPermission {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.PublisherPermission(sql.FieldIn(FieldPermission, v...))
|
|
}
|
|
|
|
// PermissionNotIn applies the NotIn predicate on the "permission" field.
|
|
func PermissionNotIn(vs ...schema.PublisherPermissionType) predicate.PublisherPermission {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.PublisherPermission(sql.FieldNotIn(FieldPermission, v...))
|
|
}
|
|
|
|
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
|
func UserIDEQ(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
|
func UserIDNEQ(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDIn applies the In predicate on the "user_id" field.
|
|
func UserIDIn(vs ...string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
|
func UserIDNotIn(vs ...string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNotIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDGT applies the GT predicate on the "user_id" field.
|
|
func UserIDGT(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGT(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDGTE applies the GTE predicate on the "user_id" field.
|
|
func UserIDGTE(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGTE(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDLT applies the LT predicate on the "user_id" field.
|
|
func UserIDLT(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLT(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDLTE applies the LTE predicate on the "user_id" field.
|
|
func UserIDLTE(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLTE(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDContains applies the Contains predicate on the "user_id" field.
|
|
func UserIDContains(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldContains(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.
|
|
func UserIDHasPrefix(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldHasPrefix(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.
|
|
func UserIDHasSuffix(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldHasSuffix(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDEqualFold applies the EqualFold predicate on the "user_id" field.
|
|
func UserIDEqualFold(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEqualFold(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.
|
|
func UserIDContainsFold(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldContainsFold(FieldUserID, v))
|
|
}
|
|
|
|
// PublisherIDEQ applies the EQ predicate on the "publisher_id" field.
|
|
func PublisherIDEQ(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEQ(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDNEQ applies the NEQ predicate on the "publisher_id" field.
|
|
func PublisherIDNEQ(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNEQ(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDIn applies the In predicate on the "publisher_id" field.
|
|
func PublisherIDIn(vs ...string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldIn(FieldPublisherID, vs...))
|
|
}
|
|
|
|
// PublisherIDNotIn applies the NotIn predicate on the "publisher_id" field.
|
|
func PublisherIDNotIn(vs ...string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldNotIn(FieldPublisherID, vs...))
|
|
}
|
|
|
|
// PublisherIDGT applies the GT predicate on the "publisher_id" field.
|
|
func PublisherIDGT(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGT(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDGTE applies the GTE predicate on the "publisher_id" field.
|
|
func PublisherIDGTE(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldGTE(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDLT applies the LT predicate on the "publisher_id" field.
|
|
func PublisherIDLT(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLT(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDLTE applies the LTE predicate on the "publisher_id" field.
|
|
func PublisherIDLTE(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldLTE(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDContains applies the Contains predicate on the "publisher_id" field.
|
|
func PublisherIDContains(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldContains(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDHasPrefix applies the HasPrefix predicate on the "publisher_id" field.
|
|
func PublisherIDHasPrefix(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldHasPrefix(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDHasSuffix applies the HasSuffix predicate on the "publisher_id" field.
|
|
func PublisherIDHasSuffix(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldHasSuffix(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDEqualFold applies the EqualFold predicate on the "publisher_id" field.
|
|
func PublisherIDEqualFold(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldEqualFold(FieldPublisherID, v))
|
|
}
|
|
|
|
// PublisherIDContainsFold applies the ContainsFold predicate on the "publisher_id" field.
|
|
func PublisherIDContainsFold(v string) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.FieldContainsFold(FieldPublisherID, v))
|
|
}
|
|
|
|
// HasUser applies the HasEdge predicate on the "user" edge.
|
|
func HasUser() predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
|
func HasUserWith(preds ...predicate.User) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(func(s *sql.Selector) {
|
|
step := newUserStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasPublisher applies the HasEdge predicate on the "publisher" edge.
|
|
func HasPublisher() predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, PublisherTable, PublisherColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasPublisherWith applies the HasEdge predicate on the "publisher" edge with a given conditions (other predicates).
|
|
func HasPublisherWith(preds ...predicate.Publisher) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(func(s *sql.Selector) {
|
|
step := newPublisherStep()
|
|
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.PublisherPermission) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.PublisherPermission) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.PublisherPermission) predicate.PublisherPermission {
|
|
return predicate.PublisherPermission(sql.NotPredicates(p))
|
|
}
|