public.users
Description
Labels
svc-portal
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| user_id | varchar(36) | false | public.app_releases | Unique user identifier (UUID). | ||
| varchar(255) | false | User email for login. | ||||
| password_hash | varchar(255) | false | Bcrypt hash of user password. | |||
| is_active | boolean | false | User active status. | |||
| full_name | varchar(255) | false | User full name. | |||
| phone_number | varchar(20) | true | User phone number. | |||
| role | varchar(50) | false | User role: SYSTEM_OPERATOR, PSP_ADMIN, MERCHANT_ADMIN, STORE_MANAGER, or STAFF. | |||
| psp_id | integer | true | PSP ID for PSP_ADMIN role. | |||
| merchant_id | integer | true | Merchant ID for MERCHANT_ADMIN and below. | |||
| store_id | integer | true | Store ID for STORE_MANAGER and STAFF. | |||
| mfa_enabled | boolean | false | MFA enabled flag. | |||
| mfa_method | varchar(50) | false | MFA method: NONE, TOTP, or EMAIL. | |||
| totp_secret | varchar(32) | true | TOTP secret key for authenticator app. | |||
| created_at | timestamp with time zone | false | Record creation timestamp. | |||
| updated_at | timestamp with time zone | false | Record last update timestamp. | |||
| last_login_at | timestamp with time zone | true | Last successful login timestamp. | |||
| password_changed_at | timestamp with time zone | true | Last password change timestamp. | |||
| failed_login_attempts | integer | false | Count of failed login attempts. | |||
| locked_until | timestamp with time zone | true | Account locked until timestamp. |
Viewpoints
| Name | Definition |
|---|---|
| Authentication & Sessions | User authentication, MFA, sessions, and audit logs |
Constraints
| Name | Type | Definition |
|---|---|---|
| users_pkey | PRIMARY KEY | PRIMARY KEY (user_id) |
Indexes
| Name | Definition |
|---|---|
| users_pkey | CREATE UNIQUE INDEX users_pkey ON public.users USING btree (user_id) |
| ix_users_email | CREATE UNIQUE INDEX ix_users_email ON public.users USING btree (email) |
| ix_users_merchant_id | CREATE INDEX ix_users_merchant_id ON public.users USING btree (merchant_id) |
| ix_users_psp_id | CREATE INDEX ix_users_psp_id ON public.users USING btree (psp_id) |
| ix_users_store_id | CREATE INDEX ix_users_store_id ON public.users USING btree (store_id) |
Relations
Generated by tbls