- Implement Audit Service (2.5) - gRPC server with Record and Query operations - Database persistence with audit schema - Service registry integration - Entry point: cmd/audit-service - Implement Identity Service (2.2) - User CRUD operations - Password hashing with argon2id - Email verification and password reset flows - Entry point: cmd/identity-service - Fix package naming conflicts in user_service.go - Implement Auth Service (2.1) - JWT token generation and validation - Login, RefreshToken, ValidateToken, Logout RPCs - Integration with Identity Service - Entry point: cmd/auth-service - Note: RefreshToken entity needs Ent generation - Implement Authz Service (2.3, 2.4) - Permission checking and authorization - User roles and permissions retrieval - RBAC-based authorization - Entry point: cmd/authz-service - Implement gRPC clients for all services - Auth, Identity, Authz, and Audit clients - Service discovery integration - Full gRPC communication - Add service configurations to config/default.yaml - Create SUMMARY.md with implementation details and testing instructions - Fix compilation errors in Identity Service (password package conflicts) - All services build successfully and tests pass
805 lines
30 KiB
Go
805 lines
30 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package user
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"git.dcentral.systems/toolz/goplt/internal/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// IDEqualFold applies the EqualFold predicate on the ID field.
|
|
func IDEqualFold(id string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldID, id))
|
|
}
|
|
|
|
// IDContainsFold applies the ContainsFold predicate on the ID field.
|
|
func IDContainsFold(id string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldID, id))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// FirstName applies equality check predicate on the "first_name" field. It's identical to FirstNameEQ.
|
|
func FirstName(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// LastName applies equality check predicate on the "last_name" field. It's identical to LastNameEQ.
|
|
func LastName(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldLastName, v))
|
|
}
|
|
|
|
// PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.
|
|
func PasswordHash(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordHash, v))
|
|
}
|
|
|
|
// Verified applies equality check predicate on the "verified" field. It's identical to VerifiedEQ.
|
|
func Verified(v bool) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldVerified, v))
|
|
}
|
|
|
|
// EmailVerificationToken applies equality check predicate on the "email_verification_token" field. It's identical to EmailVerificationTokenEQ.
|
|
func EmailVerificationToken(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// PasswordResetToken applies equality check predicate on the "password_reset_token" field. It's identical to PasswordResetTokenEQ.
|
|
func PasswordResetToken(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAt applies equality check predicate on the "password_reset_expires_at" field. It's identical to PasswordResetExpiresAtEQ.
|
|
func PasswordResetExpiresAt(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// FirstNameEQ applies the EQ predicate on the "first_name" field.
|
|
func FirstNameEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameNEQ applies the NEQ predicate on the "first_name" field.
|
|
func FirstNameNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameIn applies the In predicate on the "first_name" field.
|
|
func FirstNameIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldFirstName, vs...))
|
|
}
|
|
|
|
// FirstNameNotIn applies the NotIn predicate on the "first_name" field.
|
|
func FirstNameNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldFirstName, vs...))
|
|
}
|
|
|
|
// FirstNameGT applies the GT predicate on the "first_name" field.
|
|
func FirstNameGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameGTE applies the GTE predicate on the "first_name" field.
|
|
func FirstNameGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameLT applies the LT predicate on the "first_name" field.
|
|
func FirstNameLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameLTE applies the LTE predicate on the "first_name" field.
|
|
func FirstNameLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameContains applies the Contains predicate on the "first_name" field.
|
|
func FirstNameContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameHasPrefix applies the HasPrefix predicate on the "first_name" field.
|
|
func FirstNameHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameHasSuffix applies the HasSuffix predicate on the "first_name" field.
|
|
func FirstNameHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameIsNil applies the IsNil predicate on the "first_name" field.
|
|
func FirstNameIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldFirstName))
|
|
}
|
|
|
|
// FirstNameNotNil applies the NotNil predicate on the "first_name" field.
|
|
func FirstNameNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldFirstName))
|
|
}
|
|
|
|
// FirstNameEqualFold applies the EqualFold predicate on the "first_name" field.
|
|
func FirstNameEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameContainsFold applies the ContainsFold predicate on the "first_name" field.
|
|
func FirstNameContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldFirstName, v))
|
|
}
|
|
|
|
// LastNameEQ applies the EQ predicate on the "last_name" field.
|
|
func LastNameEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameNEQ applies the NEQ predicate on the "last_name" field.
|
|
func LastNameNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameIn applies the In predicate on the "last_name" field.
|
|
func LastNameIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldLastName, vs...))
|
|
}
|
|
|
|
// LastNameNotIn applies the NotIn predicate on the "last_name" field.
|
|
func LastNameNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldLastName, vs...))
|
|
}
|
|
|
|
// LastNameGT applies the GT predicate on the "last_name" field.
|
|
func LastNameGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameGTE applies the GTE predicate on the "last_name" field.
|
|
func LastNameGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameLT applies the LT predicate on the "last_name" field.
|
|
func LastNameLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameLTE applies the LTE predicate on the "last_name" field.
|
|
func LastNameLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameContains applies the Contains predicate on the "last_name" field.
|
|
func LastNameContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameHasPrefix applies the HasPrefix predicate on the "last_name" field.
|
|
func LastNameHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameHasSuffix applies the HasSuffix predicate on the "last_name" field.
|
|
func LastNameHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameIsNil applies the IsNil predicate on the "last_name" field.
|
|
func LastNameIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldLastName))
|
|
}
|
|
|
|
// LastNameNotNil applies the NotNil predicate on the "last_name" field.
|
|
func LastNameNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldLastName))
|
|
}
|
|
|
|
// LastNameEqualFold applies the EqualFold predicate on the "last_name" field.
|
|
func LastNameEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameContainsFold applies the ContainsFold predicate on the "last_name" field.
|
|
func LastNameContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldLastName, v))
|
|
}
|
|
|
|
// PasswordHashEQ applies the EQ predicate on the "password_hash" field.
|
|
func PasswordHashEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.
|
|
func PasswordHashNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashIn applies the In predicate on the "password_hash" field.
|
|
func PasswordHashIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldPasswordHash, vs...))
|
|
}
|
|
|
|
// PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.
|
|
func PasswordHashNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldPasswordHash, vs...))
|
|
}
|
|
|
|
// PasswordHashGT applies the GT predicate on the "password_hash" field.
|
|
func PasswordHashGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashGTE applies the GTE predicate on the "password_hash" field.
|
|
func PasswordHashGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashLT applies the LT predicate on the "password_hash" field.
|
|
func PasswordHashLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashLTE applies the LTE predicate on the "password_hash" field.
|
|
func PasswordHashLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashContains applies the Contains predicate on the "password_hash" field.
|
|
func PasswordHashContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.
|
|
func PasswordHashHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.
|
|
func PasswordHashHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.
|
|
func PasswordHashEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldPasswordHash, v))
|
|
}
|
|
|
|
// PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.
|
|
func PasswordHashContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldPasswordHash, v))
|
|
}
|
|
|
|
// VerifiedEQ applies the EQ predicate on the "verified" field.
|
|
func VerifiedEQ(v bool) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldVerified, v))
|
|
}
|
|
|
|
// VerifiedNEQ applies the NEQ predicate on the "verified" field.
|
|
func VerifiedNEQ(v bool) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldVerified, v))
|
|
}
|
|
|
|
// EmailVerificationTokenEQ applies the EQ predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenNEQ applies the NEQ predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenIn applies the In predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldEmailVerificationToken, vs...))
|
|
}
|
|
|
|
// EmailVerificationTokenNotIn applies the NotIn predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldEmailVerificationToken, vs...))
|
|
}
|
|
|
|
// EmailVerificationTokenGT applies the GT predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenGTE applies the GTE predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenLT applies the LT predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenLTE applies the LTE predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenContains applies the Contains predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenHasPrefix applies the HasPrefix predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenHasSuffix applies the HasSuffix predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenIsNil applies the IsNil predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldEmailVerificationToken))
|
|
}
|
|
|
|
// EmailVerificationTokenNotNil applies the NotNil predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldEmailVerificationToken))
|
|
}
|
|
|
|
// EmailVerificationTokenEqualFold applies the EqualFold predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// EmailVerificationTokenContainsFold applies the ContainsFold predicate on the "email_verification_token" field.
|
|
func EmailVerificationTokenContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldEmailVerificationToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenEQ applies the EQ predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenNEQ applies the NEQ predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenIn applies the In predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldPasswordResetToken, vs...))
|
|
}
|
|
|
|
// PasswordResetTokenNotIn applies the NotIn predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldPasswordResetToken, vs...))
|
|
}
|
|
|
|
// PasswordResetTokenGT applies the GT predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenGTE applies the GTE predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenLT applies the LT predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenLTE applies the LTE predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenContains applies the Contains predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenHasPrefix applies the HasPrefix predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenHasSuffix applies the HasSuffix predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenIsNil applies the IsNil predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldPasswordResetToken))
|
|
}
|
|
|
|
// PasswordResetTokenNotNil applies the NotNil predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldPasswordResetToken))
|
|
}
|
|
|
|
// PasswordResetTokenEqualFold applies the EqualFold predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetTokenContainsFold applies the ContainsFold predicate on the "password_reset_token" field.
|
|
func PasswordResetTokenContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldPasswordResetToken, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtEQ applies the EQ predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtNEQ applies the NEQ predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtNEQ(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtIn applies the In predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldPasswordResetExpiresAt, vs...))
|
|
}
|
|
|
|
// PasswordResetExpiresAtNotIn applies the NotIn predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtNotIn(vs ...time.Time) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldPasswordResetExpiresAt, vs...))
|
|
}
|
|
|
|
// PasswordResetExpiresAtGT applies the GT predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtGT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtGTE applies the GTE predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtGTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtLT applies the LT predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtLT(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtLTE applies the LTE predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtLTE(v time.Time) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldPasswordResetExpiresAt, v))
|
|
}
|
|
|
|
// PasswordResetExpiresAtIsNil applies the IsNil predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldPasswordResetExpiresAt))
|
|
}
|
|
|
|
// PasswordResetExpiresAtNotNil applies the NotNil predicate on the "password_reset_expires_at" field.
|
|
func PasswordResetExpiresAtNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldPasswordResetExpiresAt))
|
|
}
|
|
|
|
// 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))
|
|
}
|
|
|
|
// HasUserRoles applies the HasEdge predicate on the "user_roles" edge.
|
|
func HasUserRoles() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, UserRolesTable, UserRolesColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasUserRolesWith applies the HasEdge predicate on the "user_roles" edge with a given conditions (other predicates).
|
|
func HasUserRolesWith(preds ...predicate.UserRole) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newUserRolesStep()
|
|
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))
|
|
}
|