mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 14:53:55 +08:00
972 lines
32 KiB
Go
972 lines
32 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package user
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"github.com/chaitin/MonkeyCode/backend/consts"
|
|
"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.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
|
func DeletedAt(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
|
|
func Username(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldUsername, v))
|
|
}
|
|
|
|
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
|
|
func Password(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPassword, v))
|
|
}
|
|
|
|
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
|
|
func Email(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldEmail, v))
|
|
}
|
|
|
|
// AvatarURL applies equality check predicate on the "avatar_url" field. It's identical to AvatarURLEQ.
|
|
func AvatarURL(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldAvatarURL, v))
|
|
}
|
|
|
|
// Platform applies equality check predicate on the "platform" field. It's identical to PlatformEQ.
|
|
func Platform(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEQ(FieldPlatform, vc))
|
|
}
|
|
|
|
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
|
func Status(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
|
func UpdatedAt(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
|
func DeletedAtEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
|
func DeletedAtNEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
|
func DeletedAtIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldDeletedAt, vs...))
|
|
}
|
|
|
|
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
|
func DeletedAtNotIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldDeletedAt, vs...))
|
|
}
|
|
|
|
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
|
func DeletedAtGT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
|
func DeletedAtGTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
|
func DeletedAtLT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
|
func DeletedAtLTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
|
func DeletedAtIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldDeletedAt))
|
|
}
|
|
|
|
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
|
func DeletedAtNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldDeletedAt))
|
|
}
|
|
|
|
// UsernameEQ applies the EQ predicate on the "username" field.
|
|
func UsernameEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameNEQ applies the NEQ predicate on the "username" field.
|
|
func UsernameNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameIn applies the In predicate on the "username" field.
|
|
func UsernameIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldUsername, vs...))
|
|
}
|
|
|
|
// UsernameNotIn applies the NotIn predicate on the "username" field.
|
|
func UsernameNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldUsername, vs...))
|
|
}
|
|
|
|
// UsernameGT applies the GT predicate on the "username" field.
|
|
func UsernameGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameGTE applies the GTE predicate on the "username" field.
|
|
func UsernameGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameLT applies the LT predicate on the "username" field.
|
|
func UsernameLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameLTE applies the LTE predicate on the "username" field.
|
|
func UsernameLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameContains applies the Contains predicate on the "username" field.
|
|
func UsernameContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
|
|
func UsernameHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
|
|
func UsernameHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameIsNil applies the IsNil predicate on the "username" field.
|
|
func UsernameIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldUsername))
|
|
}
|
|
|
|
// UsernameNotNil applies the NotNil predicate on the "username" field.
|
|
func UsernameNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldUsername))
|
|
}
|
|
|
|
// UsernameEqualFold applies the EqualFold predicate on the "username" field.
|
|
func UsernameEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldUsername, v))
|
|
}
|
|
|
|
// UsernameContainsFold applies the ContainsFold predicate on the "username" field.
|
|
func UsernameContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldUsername, v))
|
|
}
|
|
|
|
// PasswordEQ applies the EQ predicate on the "password" field.
|
|
func PasswordEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordNEQ applies the NEQ predicate on the "password" field.
|
|
func PasswordNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordIn applies the In predicate on the "password" field.
|
|
func PasswordIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldPassword, vs...))
|
|
}
|
|
|
|
// PasswordNotIn applies the NotIn predicate on the "password" field.
|
|
func PasswordNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldPassword, vs...))
|
|
}
|
|
|
|
// PasswordGT applies the GT predicate on the "password" field.
|
|
func PasswordGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordGTE applies the GTE predicate on the "password" field.
|
|
func PasswordGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordLT applies the LT predicate on the "password" field.
|
|
func PasswordLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordLTE applies the LTE predicate on the "password" field.
|
|
func PasswordLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordContains applies the Contains predicate on the "password" field.
|
|
func PasswordContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
|
|
func PasswordHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
|
|
func PasswordHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordIsNil applies the IsNil predicate on the "password" field.
|
|
func PasswordIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldPassword))
|
|
}
|
|
|
|
// PasswordNotNil applies the NotNil predicate on the "password" field.
|
|
func PasswordNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldPassword))
|
|
}
|
|
|
|
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
|
|
func PasswordEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldPassword, v))
|
|
}
|
|
|
|
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
|
|
func PasswordContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldPassword, v))
|
|
}
|
|
|
|
// EmailEQ applies the EQ predicate on the "email" field.
|
|
func EmailEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldEmail, v))
|
|
}
|
|
|
|
// EmailNEQ applies the NEQ predicate on the "email" field.
|
|
func EmailNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldEmail, v))
|
|
}
|
|
|
|
// EmailIn applies the In predicate on the "email" field.
|
|
func EmailIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldEmail, vs...))
|
|
}
|
|
|
|
// EmailNotIn applies the NotIn predicate on the "email" field.
|
|
func EmailNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldEmail, vs...))
|
|
}
|
|
|
|
// EmailGT applies the GT predicate on the "email" field.
|
|
func EmailGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldEmail, v))
|
|
}
|
|
|
|
// EmailGTE applies the GTE predicate on the "email" field.
|
|
func EmailGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldEmail, v))
|
|
}
|
|
|
|
// EmailLT applies the LT predicate on the "email" field.
|
|
func EmailLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldEmail, v))
|
|
}
|
|
|
|
// EmailLTE applies the LTE predicate on the "email" field.
|
|
func EmailLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldEmail, v))
|
|
}
|
|
|
|
// EmailContains applies the Contains predicate on the "email" field.
|
|
func EmailContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldEmail, v))
|
|
}
|
|
|
|
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
|
|
func EmailHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldEmail, v))
|
|
}
|
|
|
|
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
|
|
func EmailHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldEmail, v))
|
|
}
|
|
|
|
// EmailIsNil applies the IsNil predicate on the "email" field.
|
|
func EmailIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldEmail))
|
|
}
|
|
|
|
// EmailNotNil applies the NotNil predicate on the "email" field.
|
|
func EmailNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldEmail))
|
|
}
|
|
|
|
// EmailEqualFold applies the EqualFold predicate on the "email" field.
|
|
func EmailEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldEmail, v))
|
|
}
|
|
|
|
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
|
|
func EmailContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldEmail, v))
|
|
}
|
|
|
|
// AvatarURLEQ applies the EQ predicate on the "avatar_url" field.
|
|
func AvatarURLEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLNEQ applies the NEQ predicate on the "avatar_url" field.
|
|
func AvatarURLNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLIn applies the In predicate on the "avatar_url" field.
|
|
func AvatarURLIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldAvatarURL, vs...))
|
|
}
|
|
|
|
// AvatarURLNotIn applies the NotIn predicate on the "avatar_url" field.
|
|
func AvatarURLNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldAvatarURL, vs...))
|
|
}
|
|
|
|
// AvatarURLGT applies the GT predicate on the "avatar_url" field.
|
|
func AvatarURLGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLGTE applies the GTE predicate on the "avatar_url" field.
|
|
func AvatarURLGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLLT applies the LT predicate on the "avatar_url" field.
|
|
func AvatarURLLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLLTE applies the LTE predicate on the "avatar_url" field.
|
|
func AvatarURLLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLContains applies the Contains predicate on the "avatar_url" field.
|
|
func AvatarURLContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLHasPrefix applies the HasPrefix predicate on the "avatar_url" field.
|
|
func AvatarURLHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLHasSuffix applies the HasSuffix predicate on the "avatar_url" field.
|
|
func AvatarURLHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLIsNil applies the IsNil predicate on the "avatar_url" field.
|
|
func AvatarURLIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldAvatarURL))
|
|
}
|
|
|
|
// AvatarURLNotNil applies the NotNil predicate on the "avatar_url" field.
|
|
func AvatarURLNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldAvatarURL))
|
|
}
|
|
|
|
// AvatarURLEqualFold applies the EqualFold predicate on the "avatar_url" field.
|
|
func AvatarURLEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldAvatarURL, v))
|
|
}
|
|
|
|
// AvatarURLContainsFold applies the ContainsFold predicate on the "avatar_url" field.
|
|
func AvatarURLContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldAvatarURL, v))
|
|
}
|
|
|
|
// PlatformEQ applies the EQ predicate on the "platform" field.
|
|
func PlatformEQ(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEQ(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformNEQ applies the NEQ predicate on the "platform" field.
|
|
func PlatformNEQ(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldNEQ(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformIn applies the In predicate on the "platform" field.
|
|
func PlatformIn(vs ...consts.UserPlatform) predicate.User {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.User(sql.FieldIn(FieldPlatform, v...))
|
|
}
|
|
|
|
// PlatformNotIn applies the NotIn predicate on the "platform" field.
|
|
func PlatformNotIn(vs ...consts.UserPlatform) predicate.User {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.User(sql.FieldNotIn(FieldPlatform, v...))
|
|
}
|
|
|
|
// PlatformGT applies the GT predicate on the "platform" field.
|
|
func PlatformGT(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldGT(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformGTE applies the GTE predicate on the "platform" field.
|
|
func PlatformGTE(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldGTE(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformLT applies the LT predicate on the "platform" field.
|
|
func PlatformLT(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldLT(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformLTE applies the LTE predicate on the "platform" field.
|
|
func PlatformLTE(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldLTE(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformContains applies the Contains predicate on the "platform" field.
|
|
func PlatformContains(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldContains(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformHasPrefix applies the HasPrefix predicate on the "platform" field.
|
|
func PlatformHasPrefix(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldHasPrefix(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformHasSuffix applies the HasSuffix predicate on the "platform" field.
|
|
func PlatformHasSuffix(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldHasSuffix(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformEqualFold applies the EqualFold predicate on the "platform" field.
|
|
func PlatformEqualFold(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEqualFold(FieldPlatform, vc))
|
|
}
|
|
|
|
// PlatformContainsFold applies the ContainsFold predicate on the "platform" field.
|
|
func PlatformContainsFold(v consts.UserPlatform) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldContainsFold(FieldPlatform, vc))
|
|
}
|
|
|
|
// StatusEQ applies the EQ predicate on the "status" field.
|
|
func StatusEQ(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusNEQ applies the NEQ predicate on the "status" field.
|
|
func StatusNEQ(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldNEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusIn applies the In predicate on the "status" field.
|
|
func StatusIn(vs ...consts.UserStatus) predicate.User {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.User(sql.FieldIn(FieldStatus, v...))
|
|
}
|
|
|
|
// StatusNotIn applies the NotIn predicate on the "status" field.
|
|
func StatusNotIn(vs ...consts.UserStatus) predicate.User {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.User(sql.FieldNotIn(FieldStatus, v...))
|
|
}
|
|
|
|
// StatusGT applies the GT predicate on the "status" field.
|
|
func StatusGT(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldGT(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusGTE applies the GTE predicate on the "status" field.
|
|
func StatusGTE(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldGTE(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusLT applies the LT predicate on the "status" field.
|
|
func StatusLT(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldLT(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusLTE applies the LTE predicate on the "status" field.
|
|
func StatusLTE(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldLTE(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusContains applies the Contains predicate on the "status" field.
|
|
func StatusContains(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldContains(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
|
func StatusHasPrefix(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldHasPrefix(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
|
func StatusHasSuffix(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldHasSuffix(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
|
func StatusEqualFold(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldEqualFold(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
|
func StatusContainsFold(v consts.UserStatus) predicate.User {
|
|
vc := string(v)
|
|
return predicate.User(sql.FieldContainsFold(FieldStatus, vc))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
|
func UpdatedAtEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
|
func UpdatedAtNEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
func UpdatedAtIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
|
func UpdatedAtGT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
|
func UpdatedAtGTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
|
func UpdatedAtLT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
|
func UpdatedAtLTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// HasLoginHistories applies the HasEdge predicate on the "login_histories" edge.
|
|
func HasLoginHistories() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, LoginHistoriesTable, LoginHistoriesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasLoginHistoriesWith applies the HasEdge predicate on the "login_histories" edge with a given conditions (other predicates).
|
|
func HasLoginHistoriesWith(preds ...predicate.UserLoginHistory) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newLoginHistoriesStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasModels applies the HasEdge predicate on the "models" edge.
|
|
func HasModels() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, ModelsTable, ModelsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasModelsWith applies the HasEdge predicate on the "models" edge with a given conditions (other predicates).
|
|
func HasModelsWith(preds ...predicate.Model) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newModelsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasTasks applies the HasEdge predicate on the "tasks" edge.
|
|
func HasTasks() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, TasksTable, TasksColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasTasksWith applies the HasEdge predicate on the "tasks" edge with a given conditions (other predicates).
|
|
func HasTasksWith(preds ...predicate.Task) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newTasksStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasIdentities applies the HasEdge predicate on the "identities" edge.
|
|
func HasIdentities() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, IdentitiesTable, IdentitiesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasIdentitiesWith applies the HasEdge predicate on the "identities" edge with a given conditions (other predicates).
|
|
func HasIdentitiesWith(preds ...predicate.UserIdentity) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newIdentitiesStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasWorkspaces applies the HasEdge predicate on the "workspaces" edge.
|
|
func HasWorkspaces() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, WorkspacesTable, WorkspacesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasWorkspacesWith applies the HasEdge predicate on the "workspaces" edge with a given conditions (other predicates).
|
|
func HasWorkspacesWith(preds ...predicate.Workspace) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newWorkspacesStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasWorkspaceFiles applies the HasEdge predicate on the "workspace_files" edge.
|
|
func HasWorkspaceFiles() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, WorkspaceFilesTable, WorkspaceFilesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasWorkspaceFilesWith applies the HasEdge predicate on the "workspace_files" edge with a given conditions (other predicates).
|
|
func HasWorkspaceFilesWith(preds ...predicate.WorkspaceFile) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newWorkspaceFilesStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasAPIKeys applies the HasEdge predicate on the "api_keys" edge.
|
|
func HasAPIKeys() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, APIKeysTable, APIKeysColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasAPIKeysWith applies the HasEdge predicate on the "api_keys" edge with a given conditions (other predicates).
|
|
func HasAPIKeysWith(preds ...predicate.ApiKey) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newAPIKeysStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasSecurityScannings applies the HasEdge predicate on the "security_scannings" edge.
|
|
func HasSecurityScannings() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, SecurityScanningsTable, SecurityScanningsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasSecurityScanningsWith applies the HasEdge predicate on the "security_scannings" edge with a given conditions (other predicates).
|
|
func HasSecurityScanningsWith(preds ...predicate.SecurityScanning) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newSecurityScanningsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasAiemployees applies the HasEdge predicate on the "aiemployees" edge.
|
|
func HasAiemployees() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, AiemployeesTable, AiemployeesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasAiemployeesWith applies the HasEdge predicate on the "aiemployees" edge with a given conditions (other predicates).
|
|
func HasAiemployeesWith(preds ...predicate.AIEmployee) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newAiemployeesStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasGroups applies the HasEdge predicate on the "groups" edge.
|
|
func HasGroups() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasGroupsWith applies the HasEdge predicate on the "groups" edge with a given conditions (other predicates).
|
|
func HasGroupsWith(preds ...predicate.UserGroup) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newGroupsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasUserGroups applies the HasEdge predicate on the "user_groups" edge.
|
|
func HasUserGroups() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, true, UserGroupsTable, UserGroupsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasUserGroupsWith applies the HasEdge predicate on the "user_groups" edge with a given conditions (other predicates).
|
|
func HasUserGroupsWith(preds ...predicate.UserGroupUser) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newUserGroupsStep()
|
|
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(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.User) predicate.User {
|
|
return predicate.User(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.User) predicate.User {
|
|
return predicate.User(sql.NotPredicates(p))
|
|
}
|