user

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedByID holds the string denoting the created_by_id field in the database.
	FieldCreatedByID = "created_by_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedByID holds the string denoting the updated_by_id field in the database.
	FieldUpdatedByID = "updated_by_id"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedByID holds the string denoting the deleted_by_id field in the database.
	FieldDeletedByID = "deleted_by_id"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldPublishedAt holds the string denoting the published_at field in the database.
	FieldPublishedAt = "published_at"
	// FieldArchivedAt holds the string denoting the archived_at field in the database.
	FieldArchivedAt = "archived_at"
	// FieldOwnerDomainID holds the string denoting the owner_domain_id field in the database.
	FieldOwnerDomainID = "owner_domain_id"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldNickname holds the string denoting the nickname field in the database.
	FieldNickname = "nickname"
	// FieldPhone holds the string denoting the phone field in the database.
	FieldPhone = "phone"
	// FieldAvatar holds the string denoting the avatar field in the database.
	FieldAvatar = "avatar"
	// FieldIsSuperAdmin holds the string denoting the is_super_admin field in the database.
	FieldIsSuperAdmin = "is_super_admin"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldMetadata holds the string denoting the metadata field in the database.
	FieldMetadata = "metadata"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// EdgePosts holds the string denoting the posts edge name in mutations.
	EdgePosts = "posts"
	// EdgeMedia holds the string denoting the media edge name in mutations.
	EdgeMedia = "media"
	// EdgeAPIKeys holds the string denoting the api_keys edge name in mutations.
	EdgeAPIKeys = "api_keys"
	// EdgeSessions holds the string denoting the sessions edge name in mutations.
	EdgeSessions = "sessions"
	// EdgeAuditLogs holds the string denoting the audit_logs edge name in mutations.
	EdgeAuditLogs = "audit_logs"
	// EdgeOperationLogs holds the string denoting the operation_logs edge name in mutations.
	EdgeOperationLogs = "operation_logs"
	// EdgeSystemErrors holds the string denoting the system_errors edge name in mutations.
	EdgeSystemErrors = "system_errors"
	// Table holds the table name of the user in the database.
	Table = "users"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "user_roles"
	// RolesInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RolesInverseTable = "roles"
	// PostsTable is the table that holds the posts relation/edge. The primary key declared below.
	PostsTable = "user_posts"
	// PostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PostsInverseTable = "posts"
	// MediaTable is the table that holds the media relation/edge.
	MediaTable = "media"
	// MediaInverseTable is the table name for the Media entity.
	// It exists in this package in order to avoid circular dependency with the "media" package.
	MediaInverseTable = "media"
	// MediaColumn is the table column denoting the media relation/edge.
	MediaColumn = "owner_id"
	// APIKeysTable is the table that holds the api_keys relation/edge.
	APIKeysTable = "api_keys"
	// APIKeysInverseTable is the table name for the ApiKey entity.
	// It exists in this package in order to avoid circular dependency with the "apikey" package.
	APIKeysInverseTable = "api_keys"
	// APIKeysColumn is the table column denoting the api_keys relation/edge.
	APIKeysColumn = "user_api_keys"
	// SessionsTable is the table that holds the sessions relation/edge. The primary key declared below.
	SessionsTable = "user_sessions"
	// SessionsInverseTable is the table name for the Session entity.
	// It exists in this package in order to avoid circular dependency with the "session" package.
	SessionsInverseTable = "sessions"
	// AuditLogsTable is the table that holds the audit_logs relation/edge. The primary key declared below.
	AuditLogsTable = "user_audit_logs"
	// AuditLogsInverseTable is the table name for the AuditLog entity.
	// It exists in this package in order to avoid circular dependency with the "auditlog" package.
	AuditLogsInverseTable = "audit_logs"
	// OperationLogsTable is the table that holds the operation_logs relation/edge.
	OperationLogsTable = "operation_logs"
	// OperationLogsInverseTable is the table name for the OperationLog entity.
	// It exists in this package in order to avoid circular dependency with the "operationlog" package.
	OperationLogsInverseTable = "operation_logs"
	// OperationLogsColumn is the table column denoting the operation_logs relation/edge.
	OperationLogsColumn = "user_id"
	// SystemErrorsTable is the table that holds the system_errors relation/edge.
	SystemErrorsTable = "system_errors"
	// SystemErrorsInverseTable is the table name for the SystemError entity.
	// It exists in this package in order to avoid circular dependency with the "systemerror" package.
	SystemErrorsInverseTable = "system_errors"
	// SystemErrorsColumn is the table column denoting the system_errors relation/edge.
	SystemErrorsColumn = "user_id"
)
View Source
const DefaultStatus = StatusActive

StatusActive is the default value of the Status enum.

Variables

View Source
var (
	// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
	// primary key for the roles relation (M2M).
	RolesPrimaryKey = []string{"user_id", "role_id"}
	// PostsPrimaryKey and PostsColumn2 are the table columns denoting the
	// primary key for the posts relation (M2M).
	PostsPrimaryKey = []string{"user_id", "post_id"}
	// SessionsPrimaryKey and SessionsColumn2 are the table columns denoting the
	// primary key for the sessions relation (M2M).
	SessionsPrimaryKey = []string{"user_id", "session_id"}
	// AuditLogsPrimaryKey and AuditLogsColumn2 are the table columns denoting the
	// primary key for the audit_logs relation (M2M).
	AuditLogsPrimaryKey = []string{"user_id", "audit_log_id"}
)
View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
	// DefaultNickname holds the default value on creation for the "nickname" field.
	DefaultNickname string
	// DefaultIsSuperAdmin holds the default value on creation for the "is_super_admin" field.
	DefaultIsSuperAdmin bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for user fields.

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func ArchivedAt

func ArchivedAt(v time.Time) predicate.User

ArchivedAt applies equality check predicate on the "archived_at" field. It's identical to ArchivedAtEQ.

func ArchivedAtEQ

func ArchivedAtEQ(v time.Time) predicate.User

ArchivedAtEQ applies the EQ predicate on the "archived_at" field.

func ArchivedAtGT

func ArchivedAtGT(v time.Time) predicate.User

ArchivedAtGT applies the GT predicate on the "archived_at" field.

func ArchivedAtGTE

func ArchivedAtGTE(v time.Time) predicate.User

ArchivedAtGTE applies the GTE predicate on the "archived_at" field.

func ArchivedAtIn

func ArchivedAtIn(vs ...time.Time) predicate.User

ArchivedAtIn applies the In predicate on the "archived_at" field.

func ArchivedAtIsNil

func ArchivedAtIsNil() predicate.User

ArchivedAtIsNil applies the IsNil predicate on the "archived_at" field.

func ArchivedAtLT

func ArchivedAtLT(v time.Time) predicate.User

ArchivedAtLT applies the LT predicate on the "archived_at" field.

func ArchivedAtLTE

func ArchivedAtLTE(v time.Time) predicate.User

ArchivedAtLTE applies the LTE predicate on the "archived_at" field.

func ArchivedAtNEQ

func ArchivedAtNEQ(v time.Time) predicate.User

ArchivedAtNEQ applies the NEQ predicate on the "archived_at" field.

func ArchivedAtNotIn

func ArchivedAtNotIn(vs ...time.Time) predicate.User

ArchivedAtNotIn applies the NotIn predicate on the "archived_at" field.

func ArchivedAtNotNil

func ArchivedAtNotNil() predicate.User

ArchivedAtNotNil applies the NotNil predicate on the "archived_at" field.

func Avatar

func Avatar(v string) predicate.User

Avatar applies equality check predicate on the "avatar" field. It's identical to AvatarEQ.

func AvatarContains

func AvatarContains(v string) predicate.User

AvatarContains applies the Contains predicate on the "avatar" field.

func AvatarContainsFold

func AvatarContainsFold(v string) predicate.User

AvatarContainsFold applies the ContainsFold predicate on the "avatar" field.

func AvatarEQ

func AvatarEQ(v string) predicate.User

AvatarEQ applies the EQ predicate on the "avatar" field.

func AvatarEqualFold

func AvatarEqualFold(v string) predicate.User

AvatarEqualFold applies the EqualFold predicate on the "avatar" field.

func AvatarGT

func AvatarGT(v string) predicate.User

AvatarGT applies the GT predicate on the "avatar" field.

func AvatarGTE

func AvatarGTE(v string) predicate.User

AvatarGTE applies the GTE predicate on the "avatar" field.

func AvatarHasPrefix

func AvatarHasPrefix(v string) predicate.User

AvatarHasPrefix applies the HasPrefix predicate on the "avatar" field.

func AvatarHasSuffix

func AvatarHasSuffix(v string) predicate.User

AvatarHasSuffix applies the HasSuffix predicate on the "avatar" field.

func AvatarIn

func AvatarIn(vs ...string) predicate.User

AvatarIn applies the In predicate on the "avatar" field.

func AvatarIsNil

func AvatarIsNil() predicate.User

AvatarIsNil applies the IsNil predicate on the "avatar" field.

func AvatarLT

func AvatarLT(v string) predicate.User

AvatarLT applies the LT predicate on the "avatar" field.

func AvatarLTE

func AvatarLTE(v string) predicate.User

AvatarLTE applies the LTE predicate on the "avatar" field.

func AvatarNEQ

func AvatarNEQ(v string) predicate.User

AvatarNEQ applies the NEQ predicate on the "avatar" field.

func AvatarNotIn

func AvatarNotIn(vs ...string) predicate.User

AvatarNotIn applies the NotIn predicate on the "avatar" field.

func AvatarNotNil

func AvatarNotNil() predicate.User

AvatarNotNil applies the NotNil predicate on the "avatar" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.User

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtIsNil

func CreatedAtIsNil() predicate.User

CreatedAtIsNil applies the IsNil predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.User

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CreatedAtNotNil

func CreatedAtNotNil() predicate.User

CreatedAtNotNil applies the NotNil predicate on the "created_at" field.

func CreatedByID

func CreatedByID(v uuid.UUID) predicate.User

CreatedByID applies equality check predicate on the "created_by_id" field. It's identical to CreatedByIDEQ.

func CreatedByIDEQ

func CreatedByIDEQ(v uuid.UUID) predicate.User

CreatedByIDEQ applies the EQ predicate on the "created_by_id" field.

func CreatedByIDGT

func CreatedByIDGT(v uuid.UUID) predicate.User

CreatedByIDGT applies the GT predicate on the "created_by_id" field.

func CreatedByIDGTE

func CreatedByIDGTE(v uuid.UUID) predicate.User

CreatedByIDGTE applies the GTE predicate on the "created_by_id" field.

func CreatedByIDIn

func CreatedByIDIn(vs ...uuid.UUID) predicate.User

CreatedByIDIn applies the In predicate on the "created_by_id" field.

func CreatedByIDIsNil

func CreatedByIDIsNil() predicate.User

CreatedByIDIsNil applies the IsNil predicate on the "created_by_id" field.

func CreatedByIDLT

func CreatedByIDLT(v uuid.UUID) predicate.User

CreatedByIDLT applies the LT predicate on the "created_by_id" field.

func CreatedByIDLTE

func CreatedByIDLTE(v uuid.UUID) predicate.User

CreatedByIDLTE applies the LTE predicate on the "created_by_id" field.

func CreatedByIDNEQ

func CreatedByIDNEQ(v uuid.UUID) predicate.User

CreatedByIDNEQ applies the NEQ predicate on the "created_by_id" field.

func CreatedByIDNotIn

func CreatedByIDNotIn(vs ...uuid.UUID) predicate.User

CreatedByIDNotIn applies the NotIn predicate on the "created_by_id" field.

func CreatedByIDNotNil

func CreatedByIDNotNil() predicate.User

CreatedByIDNotNil applies the NotNil predicate on the "created_by_id" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.User

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.User

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.User

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.User

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.User

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.User

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.User

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.User

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.User

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.User

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.User

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func DeletedByID

func DeletedByID(v uuid.UUID) predicate.User

DeletedByID applies equality check predicate on the "deleted_by_id" field. It's identical to DeletedByIDEQ.

func DeletedByIDEQ

func DeletedByIDEQ(v uuid.UUID) predicate.User

DeletedByIDEQ applies the EQ predicate on the "deleted_by_id" field.

func DeletedByIDGT

func DeletedByIDGT(v uuid.UUID) predicate.User

DeletedByIDGT applies the GT predicate on the "deleted_by_id" field.

func DeletedByIDGTE

func DeletedByIDGTE(v uuid.UUID) predicate.User

DeletedByIDGTE applies the GTE predicate on the "deleted_by_id" field.

func DeletedByIDIn

func DeletedByIDIn(vs ...uuid.UUID) predicate.User

DeletedByIDIn applies the In predicate on the "deleted_by_id" field.

func DeletedByIDIsNil

func DeletedByIDIsNil() predicate.User

DeletedByIDIsNil applies the IsNil predicate on the "deleted_by_id" field.

func DeletedByIDLT

func DeletedByIDLT(v uuid.UUID) predicate.User

DeletedByIDLT applies the LT predicate on the "deleted_by_id" field.

func DeletedByIDLTE

func DeletedByIDLTE(v uuid.UUID) predicate.User

DeletedByIDLTE applies the LTE predicate on the "deleted_by_id" field.

func DeletedByIDNEQ

func DeletedByIDNEQ(v uuid.UUID) predicate.User

DeletedByIDNEQ applies the NEQ predicate on the "deleted_by_id" field.

func DeletedByIDNotIn

func DeletedByIDNotIn(vs ...uuid.UUID) predicate.User

DeletedByIDNotIn applies the NotIn predicate on the "deleted_by_id" field.

func DeletedByIDNotNil

func DeletedByIDNotNil() predicate.User

DeletedByIDNotNil applies the NotNil predicate on the "deleted_by_id" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.User

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.User

EmailNotIn applies the NotIn predicate on the "email" field.

func HasAPIKeys

func HasAPIKeys() predicate.User

HasAPIKeys applies the HasEdge predicate on the "api_keys" edge.

func HasAPIKeysWith

func HasAPIKeysWith(preds ...predicate.ApiKey) predicate.User

HasAPIKeysWith applies the HasEdge predicate on the "api_keys" edge with a given conditions (other predicates).

func HasAuditLogs

func HasAuditLogs() predicate.User

HasAuditLogs applies the HasEdge predicate on the "audit_logs" edge.

func HasAuditLogsWith

func HasAuditLogsWith(preds ...predicate.AuditLog) predicate.User

HasAuditLogsWith applies the HasEdge predicate on the "audit_logs" edge with a given conditions (other predicates).

func HasMedia

func HasMedia() predicate.User

HasMedia applies the HasEdge predicate on the "media" edge.

func HasMediaWith

func HasMediaWith(preds ...predicate.Media) predicate.User

HasMediaWith applies the HasEdge predicate on the "media" edge with a given conditions (other predicates).

func HasOperationLogs

func HasOperationLogs() predicate.User

HasOperationLogs applies the HasEdge predicate on the "operation_logs" edge.

func HasOperationLogsWith

func HasOperationLogsWith(preds ...predicate.OperationLog) predicate.User

HasOperationLogsWith applies the HasEdge predicate on the "operation_logs" edge with a given conditions (other predicates).

func HasPosts

func HasPosts() predicate.User

HasPosts applies the HasEdge predicate on the "posts" edge.

func HasPostsWith

func HasPostsWith(preds ...predicate.Post) predicate.User

HasPostsWith applies the HasEdge predicate on the "posts" edge with a given conditions (other predicates).

func HasRoles

func HasRoles() predicate.User

HasRoles applies the HasEdge predicate on the "roles" edge.

func HasRolesWith

func HasRolesWith(preds ...predicate.Role) predicate.User

HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).

func HasSessions

func HasSessions() predicate.User

HasSessions applies the HasEdge predicate on the "sessions" edge.

func HasSessionsWith

func HasSessionsWith(preds ...predicate.Session) predicate.User

HasSessionsWith applies the HasEdge predicate on the "sessions" edge with a given conditions (other predicates).

func HasSystemErrors

func HasSystemErrors() predicate.User

HasSystemErrors applies the HasEdge predicate on the "system_errors" edge.

func HasSystemErrorsWith

func HasSystemErrorsWith(preds ...predicate.SystemError) predicate.User

HasSystemErrorsWith applies the HasEdge predicate on the "system_errors" edge with a given conditions (other predicates).

func ID

func ID(id uuid.UUID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func IsSuperAdmin

func IsSuperAdmin(v bool) predicate.User

IsSuperAdmin applies equality check predicate on the "is_super_admin" field. It's identical to IsSuperAdminEQ.

func IsSuperAdminEQ

func IsSuperAdminEQ(v bool) predicate.User

IsSuperAdminEQ applies the EQ predicate on the "is_super_admin" field.

func IsSuperAdminNEQ

func IsSuperAdminNEQ(v bool) predicate.User

IsSuperAdminNEQ applies the NEQ predicate on the "is_super_admin" field.

func MetadataIsNil

func MetadataIsNil() predicate.User

MetadataIsNil applies the IsNil predicate on the "metadata" field.

func MetadataNotNil

func MetadataNotNil() predicate.User

MetadataNotNil applies the NotNil predicate on the "metadata" field.

func Nickname

func Nickname(v string) predicate.User

Nickname applies equality check predicate on the "nickname" field. It's identical to NicknameEQ.

func NicknameContains

func NicknameContains(v string) predicate.User

NicknameContains applies the Contains predicate on the "nickname" field.

func NicknameContainsFold

func NicknameContainsFold(v string) predicate.User

NicknameContainsFold applies the ContainsFold predicate on the "nickname" field.

func NicknameEQ

func NicknameEQ(v string) predicate.User

NicknameEQ applies the EQ predicate on the "nickname" field.

func NicknameEqualFold

func NicknameEqualFold(v string) predicate.User

NicknameEqualFold applies the EqualFold predicate on the "nickname" field.

func NicknameGT

func NicknameGT(v string) predicate.User

NicknameGT applies the GT predicate on the "nickname" field.

func NicknameGTE

func NicknameGTE(v string) predicate.User

NicknameGTE applies the GTE predicate on the "nickname" field.

func NicknameHasPrefix

func NicknameHasPrefix(v string) predicate.User

NicknameHasPrefix applies the HasPrefix predicate on the "nickname" field.

func NicknameHasSuffix

func NicknameHasSuffix(v string) predicate.User

NicknameHasSuffix applies the HasSuffix predicate on the "nickname" field.

func NicknameIn

func NicknameIn(vs ...string) predicate.User

NicknameIn applies the In predicate on the "nickname" field.

func NicknameLT

func NicknameLT(v string) predicate.User

NicknameLT applies the LT predicate on the "nickname" field.

func NicknameLTE

func NicknameLTE(v string) predicate.User

NicknameLTE applies the LTE predicate on the "nickname" field.

func NicknameNEQ

func NicknameNEQ(v string) predicate.User

NicknameNEQ applies the NEQ predicate on the "nickname" field.

func NicknameNotIn

func NicknameNotIn(vs ...string) predicate.User

NicknameNotIn applies the NotIn predicate on the "nickname" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func OwnerDomainID

func OwnerDomainID(v uuid.UUID) predicate.User

OwnerDomainID applies equality check predicate on the "owner_domain_id" field. It's identical to OwnerDomainIDEQ.

func OwnerDomainIDEQ

func OwnerDomainIDEQ(v uuid.UUID) predicate.User

OwnerDomainIDEQ applies the EQ predicate on the "owner_domain_id" field.

func OwnerDomainIDGT

func OwnerDomainIDGT(v uuid.UUID) predicate.User

OwnerDomainIDGT applies the GT predicate on the "owner_domain_id" field.

func OwnerDomainIDGTE

func OwnerDomainIDGTE(v uuid.UUID) predicate.User

OwnerDomainIDGTE applies the GTE predicate on the "owner_domain_id" field.

func OwnerDomainIDIn

func OwnerDomainIDIn(vs ...uuid.UUID) predicate.User

OwnerDomainIDIn applies the In predicate on the "owner_domain_id" field.

func OwnerDomainIDIsNil

func OwnerDomainIDIsNil() predicate.User

OwnerDomainIDIsNil applies the IsNil predicate on the "owner_domain_id" field.

func OwnerDomainIDLT

func OwnerDomainIDLT(v uuid.UUID) predicate.User

OwnerDomainIDLT applies the LT predicate on the "owner_domain_id" field.

func OwnerDomainIDLTE

func OwnerDomainIDLTE(v uuid.UUID) predicate.User

OwnerDomainIDLTE applies the LTE predicate on the "owner_domain_id" field.

func OwnerDomainIDNEQ

func OwnerDomainIDNEQ(v uuid.UUID) predicate.User

OwnerDomainIDNEQ applies the NEQ predicate on the "owner_domain_id" field.

func OwnerDomainIDNotIn

func OwnerDomainIDNotIn(vs ...uuid.UUID) predicate.User

OwnerDomainIDNotIn applies the NotIn predicate on the "owner_domain_id" field.

func OwnerDomainIDNotNil

func OwnerDomainIDNotNil() predicate.User

OwnerDomainIDNotNil applies the NotNil predicate on the "owner_domain_id" field.

func PasswordHash

func PasswordHash(v string) predicate.User

PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.

func PasswordHashContains

func PasswordHashContains(v string) predicate.User

PasswordHashContains applies the Contains predicate on the "password_hash" field.

func PasswordHashContainsFold

func PasswordHashContainsFold(v string) predicate.User

PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.

func PasswordHashEQ

func PasswordHashEQ(v string) predicate.User

PasswordHashEQ applies the EQ predicate on the "password_hash" field.

func PasswordHashEqualFold

func PasswordHashEqualFold(v string) predicate.User

PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.

func PasswordHashGT

func PasswordHashGT(v string) predicate.User

PasswordHashGT applies the GT predicate on the "password_hash" field.

func PasswordHashGTE

func PasswordHashGTE(v string) predicate.User

PasswordHashGTE applies the GTE predicate on the "password_hash" field.

func PasswordHashHasPrefix

func PasswordHashHasPrefix(v string) predicate.User

PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.

func PasswordHashHasSuffix

func PasswordHashHasSuffix(v string) predicate.User

PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.

func PasswordHashIn

func PasswordHashIn(vs ...string) predicate.User

PasswordHashIn applies the In predicate on the "password_hash" field.

func PasswordHashIsNil

func PasswordHashIsNil() predicate.User

PasswordHashIsNil applies the IsNil predicate on the "password_hash" field.

func PasswordHashLT

func PasswordHashLT(v string) predicate.User

PasswordHashLT applies the LT predicate on the "password_hash" field.

func PasswordHashLTE

func PasswordHashLTE(v string) predicate.User

PasswordHashLTE applies the LTE predicate on the "password_hash" field.

func PasswordHashNEQ

func PasswordHashNEQ(v string) predicate.User

PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.

func PasswordHashNotIn

func PasswordHashNotIn(vs ...string) predicate.User

PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.

func PasswordHashNotNil

func PasswordHashNotNil() predicate.User

PasswordHashNotNil applies the NotNil predicate on the "password_hash" field.

func Phone

func Phone(v string) predicate.User

Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.

func PhoneContains

func PhoneContains(v string) predicate.User

PhoneContains applies the Contains predicate on the "phone" field.

func PhoneContainsFold

func PhoneContainsFold(v string) predicate.User

PhoneContainsFold applies the ContainsFold predicate on the "phone" field.

func PhoneEQ

func PhoneEQ(v string) predicate.User

PhoneEQ applies the EQ predicate on the "phone" field.

func PhoneEqualFold

func PhoneEqualFold(v string) predicate.User

PhoneEqualFold applies the EqualFold predicate on the "phone" field.

func PhoneGT

func PhoneGT(v string) predicate.User

PhoneGT applies the GT predicate on the "phone" field.

func PhoneGTE

func PhoneGTE(v string) predicate.User

PhoneGTE applies the GTE predicate on the "phone" field.

func PhoneHasPrefix

func PhoneHasPrefix(v string) predicate.User

PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.

func PhoneHasSuffix

func PhoneHasSuffix(v string) predicate.User

PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.

func PhoneIn

func PhoneIn(vs ...string) predicate.User

PhoneIn applies the In predicate on the "phone" field.

func PhoneIsNil

func PhoneIsNil() predicate.User

PhoneIsNil applies the IsNil predicate on the "phone" field.

func PhoneLT

func PhoneLT(v string) predicate.User

PhoneLT applies the LT predicate on the "phone" field.

func PhoneLTE

func PhoneLTE(v string) predicate.User

PhoneLTE applies the LTE predicate on the "phone" field.

func PhoneNEQ

func PhoneNEQ(v string) predicate.User

PhoneNEQ applies the NEQ predicate on the "phone" field.

func PhoneNotIn

func PhoneNotIn(vs ...string) predicate.User

PhoneNotIn applies the NotIn predicate on the "phone" field.

func PhoneNotNil

func PhoneNotNil() predicate.User

PhoneNotNil applies the NotNil predicate on the "phone" field.

func PublishedAt

func PublishedAt(v time.Time) predicate.User

PublishedAt applies equality check predicate on the "published_at" field. It's identical to PublishedAtEQ.

func PublishedAtEQ

func PublishedAtEQ(v time.Time) predicate.User

PublishedAtEQ applies the EQ predicate on the "published_at" field.

func PublishedAtGT

func PublishedAtGT(v time.Time) predicate.User

PublishedAtGT applies the GT predicate on the "published_at" field.

func PublishedAtGTE

func PublishedAtGTE(v time.Time) predicate.User

PublishedAtGTE applies the GTE predicate on the "published_at" field.

func PublishedAtIn

func PublishedAtIn(vs ...time.Time) predicate.User

PublishedAtIn applies the In predicate on the "published_at" field.

func PublishedAtIsNil

func PublishedAtIsNil() predicate.User

PublishedAtIsNil applies the IsNil predicate on the "published_at" field.

func PublishedAtLT

func PublishedAtLT(v time.Time) predicate.User

PublishedAtLT applies the LT predicate on the "published_at" field.

func PublishedAtLTE

func PublishedAtLTE(v time.Time) predicate.User

PublishedAtLTE applies the LTE predicate on the "published_at" field.

func PublishedAtNEQ

func PublishedAtNEQ(v time.Time) predicate.User

PublishedAtNEQ applies the NEQ predicate on the "published_at" field.

func PublishedAtNotIn

func PublishedAtNotIn(vs ...time.Time) predicate.User

PublishedAtNotIn applies the NotIn predicate on the "published_at" field.

func PublishedAtNotNil

func PublishedAtNotNil() predicate.User

PublishedAtNotNil applies the NotNil predicate on the "published_at" field.

func StatusEQ

func StatusEQ(v Status) predicate.User

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.User

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.User

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.User

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.User

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.User

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.User

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.User

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

func UpdatedByID

func UpdatedByID(v uuid.UUID) predicate.User

UpdatedByID applies equality check predicate on the "updated_by_id" field. It's identical to UpdatedByIDEQ.

func UpdatedByIDEQ

func UpdatedByIDEQ(v uuid.UUID) predicate.User

UpdatedByIDEQ applies the EQ predicate on the "updated_by_id" field.

func UpdatedByIDGT

func UpdatedByIDGT(v uuid.UUID) predicate.User

UpdatedByIDGT applies the GT predicate on the "updated_by_id" field.

func UpdatedByIDGTE

func UpdatedByIDGTE(v uuid.UUID) predicate.User

UpdatedByIDGTE applies the GTE predicate on the "updated_by_id" field.

func UpdatedByIDIn

func UpdatedByIDIn(vs ...uuid.UUID) predicate.User

UpdatedByIDIn applies the In predicate on the "updated_by_id" field.

func UpdatedByIDIsNil

func UpdatedByIDIsNil() predicate.User

UpdatedByIDIsNil applies the IsNil predicate on the "updated_by_id" field.

func UpdatedByIDLT

func UpdatedByIDLT(v uuid.UUID) predicate.User

UpdatedByIDLT applies the LT predicate on the "updated_by_id" field.

func UpdatedByIDLTE

func UpdatedByIDLTE(v uuid.UUID) predicate.User

UpdatedByIDLTE applies the LTE predicate on the "updated_by_id" field.

func UpdatedByIDNEQ

func UpdatedByIDNEQ(v uuid.UUID) predicate.User

UpdatedByIDNEQ applies the NEQ predicate on the "updated_by_id" field.

func UpdatedByIDNotIn

func UpdatedByIDNotIn(vs ...uuid.UUID) predicate.User

UpdatedByIDNotIn applies the NotIn predicate on the "updated_by_id" field.

func UpdatedByIDNotNil

func UpdatedByIDNotNil() predicate.User

UpdatedByIDNotNil applies the NotNil predicate on the "updated_by_id" field.

func Username

func Username(v string) predicate.User

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.User

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.User

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.User

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.User

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.User

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.User

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.User

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.User

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.User

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.User

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.User

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.User

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.User

UsernameNotIn applies the NotIn predicate on the "username" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByAPIKeys

func ByAPIKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAPIKeys orders the results by api_keys terms.

func ByAPIKeysCount

func ByAPIKeysCount(opts ...sql.OrderTermOption) OrderOption

ByAPIKeysCount orders the results by api_keys count.

func ByArchivedAt

func ByArchivedAt(opts ...sql.OrderTermOption) OrderOption

ByArchivedAt orders the results by the archived_at field.

func ByAuditLogs

func ByAuditLogs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAuditLogs orders the results by audit_logs terms.

func ByAuditLogsCount

func ByAuditLogsCount(opts ...sql.OrderTermOption) OrderOption

ByAuditLogsCount orders the results by audit_logs count.

func ByAvatar

func ByAvatar(opts ...sql.OrderTermOption) OrderOption

ByAvatar orders the results by the avatar field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByCreatedByID

func ByCreatedByID(opts ...sql.OrderTermOption) OrderOption

ByCreatedByID orders the results by the created_by_id field.

func ByDeletedAt

func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption

ByDeletedAt orders the results by the deleted_at field.

func ByDeletedByID

func ByDeletedByID(opts ...sql.OrderTermOption) OrderOption

ByDeletedByID orders the results by the deleted_by_id field.

func ByEmail

func ByEmail(opts ...sql.OrderTermOption) OrderOption

ByEmail orders the results by the email field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsSuperAdmin

func ByIsSuperAdmin(opts ...sql.OrderTermOption) OrderOption

ByIsSuperAdmin orders the results by the is_super_admin field.

func ByMedia

func ByMedia(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMedia orders the results by media terms.

func ByMediaCount

func ByMediaCount(opts ...sql.OrderTermOption) OrderOption

ByMediaCount orders the results by media count.

func ByNickname

func ByNickname(opts ...sql.OrderTermOption) OrderOption

ByNickname orders the results by the nickname field.

func ByOperationLogs

func ByOperationLogs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByOperationLogs orders the results by operation_logs terms.

func ByOperationLogsCount

func ByOperationLogsCount(opts ...sql.OrderTermOption) OrderOption

ByOperationLogsCount orders the results by operation_logs count.

func ByOwnerDomainID

func ByOwnerDomainID(opts ...sql.OrderTermOption) OrderOption

ByOwnerDomainID orders the results by the owner_domain_id field.

func ByPasswordHash

func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption

ByPasswordHash orders the results by the password_hash field.

func ByPhone

func ByPhone(opts ...sql.OrderTermOption) OrderOption

ByPhone orders the results by the phone field.

func ByPosts

func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByPosts orders the results by posts terms.

func ByPostsCount

func ByPostsCount(opts ...sql.OrderTermOption) OrderOption

ByPostsCount orders the results by posts count.

func ByPublishedAt

func ByPublishedAt(opts ...sql.OrderTermOption) OrderOption

ByPublishedAt orders the results by the published_at field.

func ByRoles

func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRoles orders the results by roles terms.

func ByRolesCount

func ByRolesCount(opts ...sql.OrderTermOption) OrderOption

ByRolesCount orders the results by roles count.

func BySessions

func BySessions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySessions orders the results by sessions terms.

func BySessionsCount

func BySessionsCount(opts ...sql.OrderTermOption) OrderOption

BySessionsCount orders the results by sessions count.

func ByStatus

func ByStatus(opts ...sql.OrderTermOption) OrderOption

ByStatus orders the results by the status field.

func BySystemErrors

func BySystemErrors(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySystemErrors orders the results by system_errors terms.

func BySystemErrorsCount

func BySystemErrorsCount(opts ...sql.OrderTermOption) OrderOption

BySystemErrorsCount orders the results by system_errors count.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedByID

func ByUpdatedByID(opts ...sql.OrderTermOption) OrderOption

ByUpdatedByID orders the results by the updated_by_id field.

func ByUsername

func ByUsername(opts ...sql.OrderTermOption) OrderOption

ByUsername orders the results by the username field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusActive    Status = "active"
	StatusInactive  Status = "inactive"
	StatusSuspended Status = "suspended"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL