2022-09-08 09:18:04 +02:00

702 lines
21 KiB
Go

// Code generated by ent, DO NOT EDIT.
package punishments
import (
"entgo.io/ent/dialect/sql"
"github.com/FrankenBotDev/FrankenAPI/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldID), id))
})
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
v := make([]interface{}, len(ids))
for i := range v {
v[i] = ids[i]
}
s.Where(sql.In(s.C(FieldID), v...))
})
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
v := make([]interface{}, len(ids))
for i := range v {
v[i] = ids[i]
}
s.Where(sql.NotIn(s.C(FieldID), v...))
})
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldID), id))
})
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldID), id))
})
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldID), id))
})
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldID), id))
})
}
// Serverid applies equality check predicate on the "serverid" field. It's identical to ServeridEQ.
func Serverid(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldServerid), v))
})
}
// Warnamount applies equality check predicate on the "warnamount" field. It's identical to WarnamountEQ.
func Warnamount(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWarnamount), v))
})
}
// Actiontype applies equality check predicate on the "actiontype" field. It's identical to ActiontypeEQ.
func Actiontype(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldActiontype), v))
})
}
// Duration applies equality check predicate on the "duration" field. It's identical to DurationEQ.
func Duration(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDuration), v))
})
}
// Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.
func Reason(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldReason), v))
})
}
// ServeridEQ applies the EQ predicate on the "serverid" field.
func ServeridEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldServerid), v))
})
}
// ServeridNEQ applies the NEQ predicate on the "serverid" field.
func ServeridNEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldServerid), v))
})
}
// ServeridIn applies the In predicate on the "serverid" field.
func ServeridIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldServerid), v...))
})
}
// ServeridNotIn applies the NotIn predicate on the "serverid" field.
func ServeridNotIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldServerid), v...))
})
}
// ServeridGT applies the GT predicate on the "serverid" field.
func ServeridGT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldServerid), v))
})
}
// ServeridGTE applies the GTE predicate on the "serverid" field.
func ServeridGTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldServerid), v))
})
}
// ServeridLT applies the LT predicate on the "serverid" field.
func ServeridLT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldServerid), v))
})
}
// ServeridLTE applies the LTE predicate on the "serverid" field.
func ServeridLTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldServerid), v))
})
}
// ServeridContains applies the Contains predicate on the "serverid" field.
func ServeridContains(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldServerid), v))
})
}
// ServeridHasPrefix applies the HasPrefix predicate on the "serverid" field.
func ServeridHasPrefix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldServerid), v))
})
}
// ServeridHasSuffix applies the HasSuffix predicate on the "serverid" field.
func ServeridHasSuffix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldServerid), v))
})
}
// ServeridEqualFold applies the EqualFold predicate on the "serverid" field.
func ServeridEqualFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldServerid), v))
})
}
// ServeridContainsFold applies the ContainsFold predicate on the "serverid" field.
func ServeridContainsFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldServerid), v))
})
}
// WarnamountEQ applies the EQ predicate on the "warnamount" field.
func WarnamountEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWarnamount), v))
})
}
// WarnamountNEQ applies the NEQ predicate on the "warnamount" field.
func WarnamountNEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldWarnamount), v))
})
}
// WarnamountIn applies the In predicate on the "warnamount" field.
func WarnamountIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldWarnamount), v...))
})
}
// WarnamountNotIn applies the NotIn predicate on the "warnamount" field.
func WarnamountNotIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldWarnamount), v...))
})
}
// WarnamountGT applies the GT predicate on the "warnamount" field.
func WarnamountGT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldWarnamount), v))
})
}
// WarnamountGTE applies the GTE predicate on the "warnamount" field.
func WarnamountGTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldWarnamount), v))
})
}
// WarnamountLT applies the LT predicate on the "warnamount" field.
func WarnamountLT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldWarnamount), v))
})
}
// WarnamountLTE applies the LTE predicate on the "warnamount" field.
func WarnamountLTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldWarnamount), v))
})
}
// WarnamountContains applies the Contains predicate on the "warnamount" field.
func WarnamountContains(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldWarnamount), v))
})
}
// WarnamountHasPrefix applies the HasPrefix predicate on the "warnamount" field.
func WarnamountHasPrefix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldWarnamount), v))
})
}
// WarnamountHasSuffix applies the HasSuffix predicate on the "warnamount" field.
func WarnamountHasSuffix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldWarnamount), v))
})
}
// WarnamountEqualFold applies the EqualFold predicate on the "warnamount" field.
func WarnamountEqualFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldWarnamount), v))
})
}
// WarnamountContainsFold applies the ContainsFold predicate on the "warnamount" field.
func WarnamountContainsFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldWarnamount), v))
})
}
// ActiontypeEQ applies the EQ predicate on the "actiontype" field.
func ActiontypeEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldActiontype), v))
})
}
// ActiontypeNEQ applies the NEQ predicate on the "actiontype" field.
func ActiontypeNEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldActiontype), v))
})
}
// ActiontypeIn applies the In predicate on the "actiontype" field.
func ActiontypeIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldActiontype), v...))
})
}
// ActiontypeNotIn applies the NotIn predicate on the "actiontype" field.
func ActiontypeNotIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldActiontype), v...))
})
}
// ActiontypeGT applies the GT predicate on the "actiontype" field.
func ActiontypeGT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldActiontype), v))
})
}
// ActiontypeGTE applies the GTE predicate on the "actiontype" field.
func ActiontypeGTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldActiontype), v))
})
}
// ActiontypeLT applies the LT predicate on the "actiontype" field.
func ActiontypeLT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldActiontype), v))
})
}
// ActiontypeLTE applies the LTE predicate on the "actiontype" field.
func ActiontypeLTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldActiontype), v))
})
}
// ActiontypeContains applies the Contains predicate on the "actiontype" field.
func ActiontypeContains(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldActiontype), v))
})
}
// ActiontypeHasPrefix applies the HasPrefix predicate on the "actiontype" field.
func ActiontypeHasPrefix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldActiontype), v))
})
}
// ActiontypeHasSuffix applies the HasSuffix predicate on the "actiontype" field.
func ActiontypeHasSuffix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldActiontype), v))
})
}
// ActiontypeEqualFold applies the EqualFold predicate on the "actiontype" field.
func ActiontypeEqualFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldActiontype), v))
})
}
// ActiontypeContainsFold applies the ContainsFold predicate on the "actiontype" field.
func ActiontypeContainsFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldActiontype), v))
})
}
// DurationEQ applies the EQ predicate on the "duration" field.
func DurationEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDuration), v))
})
}
// DurationNEQ applies the NEQ predicate on the "duration" field.
func DurationNEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldDuration), v))
})
}
// DurationIn applies the In predicate on the "duration" field.
func DurationIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldDuration), v...))
})
}
// DurationNotIn applies the NotIn predicate on the "duration" field.
func DurationNotIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldDuration), v...))
})
}
// DurationGT applies the GT predicate on the "duration" field.
func DurationGT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldDuration), v))
})
}
// DurationGTE applies the GTE predicate on the "duration" field.
func DurationGTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldDuration), v))
})
}
// DurationLT applies the LT predicate on the "duration" field.
func DurationLT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldDuration), v))
})
}
// DurationLTE applies the LTE predicate on the "duration" field.
func DurationLTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldDuration), v))
})
}
// DurationContains applies the Contains predicate on the "duration" field.
func DurationContains(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldDuration), v))
})
}
// DurationHasPrefix applies the HasPrefix predicate on the "duration" field.
func DurationHasPrefix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldDuration), v))
})
}
// DurationHasSuffix applies the HasSuffix predicate on the "duration" field.
func DurationHasSuffix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldDuration), v))
})
}
// DurationEqualFold applies the EqualFold predicate on the "duration" field.
func DurationEqualFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldDuration), v))
})
}
// DurationContainsFold applies the ContainsFold predicate on the "duration" field.
func DurationContainsFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldDuration), v))
})
}
// ReasonEQ applies the EQ predicate on the "reason" field.
func ReasonEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldReason), v))
})
}
// ReasonNEQ applies the NEQ predicate on the "reason" field.
func ReasonNEQ(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldReason), v))
})
}
// ReasonIn applies the In predicate on the "reason" field.
func ReasonIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldReason), v...))
})
}
// ReasonNotIn applies the NotIn predicate on the "reason" field.
func ReasonNotIn(vs ...string) predicate.Punishments {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Punishments(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldReason), v...))
})
}
// ReasonGT applies the GT predicate on the "reason" field.
func ReasonGT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldReason), v))
})
}
// ReasonGTE applies the GTE predicate on the "reason" field.
func ReasonGTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldReason), v))
})
}
// ReasonLT applies the LT predicate on the "reason" field.
func ReasonLT(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldReason), v))
})
}
// ReasonLTE applies the LTE predicate on the "reason" field.
func ReasonLTE(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldReason), v))
})
}
// ReasonContains applies the Contains predicate on the "reason" field.
func ReasonContains(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldReason), v))
})
}
// ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.
func ReasonHasPrefix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldReason), v))
})
}
// ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.
func ReasonHasSuffix(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldReason), v))
})
}
// ReasonEqualFold applies the EqualFold predicate on the "reason" field.
func ReasonEqualFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldReason), v))
})
}
// ReasonContainsFold applies the ContainsFold predicate on the "reason" field.
func ReasonContainsFold(v string) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldReason), v))
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Punishments) predicate.Punishments {
return predicate.Punishments(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.Punishments) predicate.Punishments {
return predicate.Punishments(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.Punishments) predicate.Punishments {
return predicate.Punishments(func(s *sql.Selector) {
p(s.Not())
})
}