Skip to main content

User Model

Overview

Stores end-user account information, including personal details, authentication info, localization preferences, security settings (like MFA), and account status.

Fields

FieldTypeDescriptionRequired
idstringA unique identifier for the user
emailstringThe email address associated with the user. Also indexed for quick lookups and uniqueness enforcement.
firstnamestringThe first name of the user.
middlenamestringThe middle name of the user
lastnamestringThe last name of the user.
phoneNumberstringThe phone number of the user. May include country code unless stored separately.
countryCodeobjectThe country code associated with the user's phone number. Helps in formatting, validation, or internationalization.
endUserLicenseAgreementanyThe user's agreement to terms and conditions, typically stored in text format. Could be a flag, timestamp, or even raw text of the agreement they accepted.
languagestringThe preferred language of the user. Enables multilingual support and localization.
user_typestringThe classification of the user. Useful for permissions, UI behavior, or data filtering.
userlogostringThe profile picture or logo associated with the user.
isActivebooleanIndicates whether the user account is active. Used for login control and filtering inactive users.
created_atdateThe timestamp when the user account was created.
modified_atdateThe timestamp when the user account was last updated.
pinanyA security PIN associated with the user account. Stores a numeric or alphanumeric PIN.
isMfaEnabledbooleanIndicates whether multi-factor authentication (MFA) is enabled. Flag for whether Multi-Factor Authentication is enabled (1) or not (0).
mfaSecretCodestringThe secret code used for multi-factor authentication. Secret key used to generate TOTP
additionalInfoobjectAny extra information related to the user.
avatarobjectavatar field
recoveryCodesarrayBackup codes for account recovery. Often stored encrypted and hashed for security.

Relationships

  • Hasmany Unknown
  • Hasone Unknown
  • Belongsto Unknown

Sample JSON

{
"id": "example_value",
"email": "example_value",
"firstname": "example_value",
"middlename": "example_value",
"lastname": "example_value",
"phoneNumber": "example_value",
"countryCode": "example_value",
"endUserLicenseAgreement": "example_value",
"language": "example_value",
"user_type": "example_value",
"userlogo": "example_value",
"isActive": "example_value",
"created_at": "example_value",
"modified_at": "example_value",
"pin": "example_value",
"isMfaEnabled": "example_value",
"mfaSecretCode": "example_value",
"additionalInfo": "example_value",
"avatar": "example_value",
"recoveryCodes": "example_value"
}