Skip to content

public.users

Description

Labels

svc-portal

Columns

NameTypeDefaultNullableChildrenParentsComment
user_idvarchar(36)falsepublic.app_releasesUnique user identifier (UUID).
emailvarchar(255)falseUser email for login.
password_hashvarchar(255)falseBcrypt hash of user password.
is_activebooleanfalseUser active status.
full_namevarchar(255)falseUser full name.
phone_numbervarchar(20)trueUser phone number.
rolevarchar(50)falseUser role: SYSTEM_OPERATOR, PSP_ADMIN, MERCHANT_ADMIN, STORE_MANAGER, or STAFF.
psp_idintegertruePSP ID for PSP_ADMIN role.
merchant_idintegertrueMerchant ID for MERCHANT_ADMIN and below.
store_idintegertrueStore ID for STORE_MANAGER and STAFF.
mfa_enabledbooleanfalseMFA enabled flag.
mfa_methodvarchar(50)falseMFA method: NONE, TOTP, or EMAIL.
totp_secretvarchar(32)trueTOTP secret key for authenticator app.
created_attimestamp with time zonefalseRecord creation timestamp.
updated_attimestamp with time zonefalseRecord last update timestamp.
last_login_attimestamp with time zonetrueLast successful login timestamp.
password_changed_attimestamp with time zonetrueLast password change timestamp.
failed_login_attemptsintegerfalseCount of failed login attempts.
locked_untiltimestamp with time zonetrueAccount locked until timestamp.

Viewpoints

NameDefinition
Authentication & SessionsUser authentication, MFA, sessions, and audit logs

Constraints

NameTypeDefinition
users_pkeyPRIMARY KEYPRIMARY KEY (user_id)

Indexes

NameDefinition
users_pkeyCREATE UNIQUE INDEX users_pkey ON public.users USING btree (user_id)
ix_users_emailCREATE UNIQUE INDEX ix_users_email ON public.users USING btree (email)
ix_users_merchant_idCREATE INDEX ix_users_merchant_id ON public.users USING btree (merchant_id)
ix_users_psp_idCREATE INDEX ix_users_psp_id ON public.users USING btree (psp_id)
ix_users_store_idCREATE INDEX ix_users_store_id ON public.users USING btree (store_id)

Relations


Generated by tbls

MPAC — MP-Solution Advanced Cloud Service