2022-08-30 18:04:50 +00:00
|
|
|
// Code generated by ent, DO NOT EDIT.
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
package user
|
|
|
|
|
|
|
|
import (
|
2022-08-30 18:04:50 +00:00
|
|
|
"time"
|
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
"entgo.io/ent/dialect/sql"
|
|
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
|
|
"github.com/google/uuid"
|
2022-10-30 04:05:38 +00:00
|
|
|
"github.com/hay-kot/homebox/backend/internal/data/ent/predicate"
|
2022-08-30 02:30:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ID filters vertices based on their ID field.
|
|
|
|
func ID(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
|
|
func IDEQ(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
|
|
func IDNEQ(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
|
|
func IDIn(ids ...uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldID, ids...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
|
|
func IDNotIn(ids ...uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldID, ids...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
|
|
func IDGT(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
|
|
func IDGTE(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
|
|
func IDLT(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
|
|
func IDLTE(id uuid.UUID) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldID, id))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 18:04:50 +00:00
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
|
|
func CreatedAt(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
|
|
|
func UpdatedAt(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
|
|
|
func Name(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
|
|
|
|
func Email(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
|
|
|
|
func Password(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuperuser applies equality check predicate on the "is_superuser" field. It's identical to IsSuperuserEQ.
|
|
|
|
func IsSuperuser(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldIsSuperuser, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
2022-10-09 17:44:13 +00:00
|
|
|
// Superuser applies equality check predicate on the "superuser" field. It's identical to SuperuserEQ.
|
|
|
|
func Superuser(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldSuperuser, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOn applies equality check predicate on the "activated_on" field. It's identical to ActivatedOnEQ.
|
|
|
|
func ActivatedOn(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 18:04:50 +00:00
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
|
|
func CreatedAtEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
|
|
func CreatedAtNEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
|
|
func CreatedAtIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldCreatedAt, vs...))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldCreatedAt, vs...))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
|
|
func CreatedAtGT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
|
|
func CreatedAtGTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
|
|
func CreatedAtLT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
|
|
func CreatedAtLTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldCreatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtNEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldUpdatedAt, vs...))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtGT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtGTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtLT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
|
|
|
func UpdatedAtLTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldUpdatedAt, v))
|
2022-08-30 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
// NameEQ applies the EQ predicate on the "name" field.
|
|
|
|
func NameEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameNEQ applies the NEQ predicate on the "name" field.
|
|
|
|
func NameNEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameIn applies the In predicate on the "name" field.
|
|
|
|
func NameIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldName, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameNotIn applies the NotIn predicate on the "name" field.
|
|
|
|
func NameNotIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldName, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameGT applies the GT predicate on the "name" field.
|
|
|
|
func NameGT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameGTE applies the GTE predicate on the "name" field.
|
|
|
|
func NameGTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameLT applies the LT predicate on the "name" field.
|
|
|
|
func NameLT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameLTE applies the LTE predicate on the "name" field.
|
|
|
|
func NameLTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameContains applies the Contains predicate on the "name" field.
|
|
|
|
func NameContains(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContains(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
|
|
|
func NameHasPrefix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasPrefix(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
|
|
|
func NameHasSuffix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasSuffix(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
|
|
|
func NameEqualFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEqualFold(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
|
|
|
func NameContainsFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContainsFold(FieldName, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailEQ applies the EQ predicate on the "email" field.
|
|
|
|
func EmailEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailNEQ applies the NEQ predicate on the "email" field.
|
|
|
|
func EmailNEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailIn applies the In predicate on the "email" field.
|
|
|
|
func EmailIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldEmail, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailNotIn applies the NotIn predicate on the "email" field.
|
|
|
|
func EmailNotIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldEmail, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailGT applies the GT predicate on the "email" field.
|
|
|
|
func EmailGT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailGTE applies the GTE predicate on the "email" field.
|
|
|
|
func EmailGTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailLT applies the LT predicate on the "email" field.
|
|
|
|
func EmailLT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailLTE applies the LTE predicate on the "email" field.
|
|
|
|
func EmailLTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailContains applies the Contains predicate on the "email" field.
|
|
|
|
func EmailContains(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContains(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
|
|
|
|
func EmailHasPrefix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasPrefix(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
|
|
|
|
func EmailHasSuffix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasSuffix(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailEqualFold applies the EqualFold predicate on the "email" field.
|
|
|
|
func EmailEqualFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEqualFold(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
|
|
|
|
func EmailContainsFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContainsFold(FieldEmail, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordEQ applies the EQ predicate on the "password" field.
|
|
|
|
func PasswordEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordNEQ applies the NEQ predicate on the "password" field.
|
|
|
|
func PasswordNEQ(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordIn applies the In predicate on the "password" field.
|
|
|
|
func PasswordIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldPassword, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordNotIn applies the NotIn predicate on the "password" field.
|
|
|
|
func PasswordNotIn(vs ...string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldPassword, vs...))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordGT applies the GT predicate on the "password" field.
|
|
|
|
func PasswordGT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordGTE applies the GTE predicate on the "password" field.
|
|
|
|
func PasswordGTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordLT applies the LT predicate on the "password" field.
|
|
|
|
func PasswordLT(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordLTE applies the LTE predicate on the "password" field.
|
|
|
|
func PasswordLTE(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordContains applies the Contains predicate on the "password" field.
|
|
|
|
func PasswordContains(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContains(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
|
|
|
|
func PasswordHasPrefix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasPrefix(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
|
|
|
|
func PasswordHasSuffix(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldHasSuffix(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
|
|
|
|
func PasswordEqualFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEqualFold(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
|
|
|
|
func PasswordContainsFold(v string) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldContainsFold(FieldPassword, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuperuserEQ applies the EQ predicate on the "is_superuser" field.
|
|
|
|
func IsSuperuserEQ(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldIsSuperuser, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuperuserNEQ applies the NEQ predicate on the "is_superuser" field.
|
|
|
|
func IsSuperuserNEQ(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldIsSuperuser, v))
|
2022-08-30 02:30:36 +00:00
|
|
|
}
|
|
|
|
|
2022-10-09 17:44:13 +00:00
|
|
|
// RoleEQ applies the EQ predicate on the "role" field.
|
|
|
|
func RoleEQ(v Role) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldRole, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RoleNEQ applies the NEQ predicate on the "role" field.
|
|
|
|
func RoleNEQ(v Role) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldRole, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RoleIn applies the In predicate on the "role" field.
|
|
|
|
func RoleIn(vs ...Role) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldRole, vs...))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RoleNotIn applies the NotIn predicate on the "role" field.
|
|
|
|
func RoleNotIn(vs ...Role) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldRole, vs...))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SuperuserEQ applies the EQ predicate on the "superuser" field.
|
|
|
|
func SuperuserEQ(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldSuperuser, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SuperuserNEQ applies the NEQ predicate on the "superuser" field.
|
|
|
|
func SuperuserNEQ(v bool) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldSuperuser, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnEQ applies the EQ predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldEQ(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnNEQ applies the NEQ predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnNEQ(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNEQ(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnIn applies the In predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIn(FieldActivatedOn, vs...))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnNotIn applies the NotIn predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnNotIn(vs ...time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotIn(FieldActivatedOn, vs...))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnGT applies the GT predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnGT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGT(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnGTE applies the GTE predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnGTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldGTE(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnLT applies the LT predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnLT(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLT(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnLTE applies the LTE predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnLTE(v time.Time) predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldLTE(FieldActivatedOn, v))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnIsNil applies the IsNil predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnIsNil() predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldIsNull(FieldActivatedOn))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ActivatedOnNotNil applies the NotNil predicate on the "activated_on" field.
|
|
|
|
func ActivatedOnNotNil() predicate.User {
|
2023-01-19 05:44:06 +00:00
|
|
|
return predicate.User(sql.FieldNotNull(FieldActivatedOn))
|
2022-10-09 17:44:13 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 18:04:50 +00:00
|
|
|
// HasGroup applies the HasEdge predicate on the "group" edge.
|
|
|
|
func HasGroup() predicate.User {
|
|
|
|
return predicate.User(func(s *sql.Selector) {
|
|
|
|
step := sqlgraph.NewStep(
|
|
|
|
sqlgraph.From(Table, FieldID),
|
|
|
|
sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
|
|
|
|
)
|
|
|
|
sqlgraph.HasNeighbors(s, step)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
|
|
|
|
func HasGroupWith(preds ...predicate.Group) predicate.User {
|
|
|
|
return predicate.User(func(s *sql.Selector) {
|
|
|
|
step := sqlgraph.NewStep(
|
|
|
|
sqlgraph.From(Table, FieldID),
|
|
|
|
sqlgraph.To(GroupInverseTable, FieldID),
|
|
|
|
sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
|
|
|
|
)
|
|
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
|
|
for _, p := range preds {
|
|
|
|
p(s)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
// HasAuthTokens applies the HasEdge predicate on the "auth_tokens" edge.
|
|
|
|
func HasAuthTokens() predicate.User {
|
|
|
|
return predicate.User(func(s *sql.Selector) {
|
|
|
|
step := sqlgraph.NewStep(
|
|
|
|
sqlgraph.From(Table, FieldID),
|
|
|
|
sqlgraph.Edge(sqlgraph.O2M, false, AuthTokensTable, AuthTokensColumn),
|
|
|
|
)
|
|
|
|
sqlgraph.HasNeighbors(s, step)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// HasAuthTokensWith applies the HasEdge predicate on the "auth_tokens" edge with a given conditions (other predicates).
|
|
|
|
func HasAuthTokensWith(preds ...predicate.AuthTokens) predicate.User {
|
|
|
|
return predicate.User(func(s *sql.Selector) {
|
|
|
|
step := sqlgraph.NewStep(
|
|
|
|
sqlgraph.From(Table, FieldID),
|
|
|
|
sqlgraph.To(AuthTokensInverseTable, FieldID),
|
|
|
|
sqlgraph.Edge(sqlgraph.O2M, false, AuthTokensTable, AuthTokensColumn),
|
|
|
|
)
|
|
|
|
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())
|
|
|
|
})
|
|
|
|
}
|