User Model
Overview
Stores end-user account information, including personal details, authentication info, localization preferences, security settings (like MFA), and account status.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | A unique identifier for the user | ❌ |
| string | The email address associated with the user. Also indexed for quick lookups and uniqueness enforcement. | ✅ | |
| firstname | string | The first name of the user. | ❌ |
| middlename | string | The middle name of the user | ❌ |
| lastname | string | The last name of the user. | ❌ |
| phoneNumber | string | The phone number of the user. May include country code unless stored separately. | ✅ |
| countryCode | object | The country code associated with the user's phone number. Helps in formatting, validation, or internationalization. | ✅ |
| endUserLicenseAgreement | any | The 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. | ❌ |
| language | string | The preferred language of the user. Enables multilingual support and localization. | ❌ |
| user_type | string | The classification of the user. Useful for permissions, UI behavior, or data filtering. | ❌ |
| userlogo | string | The profile picture or logo associated with the user. | ❌ |
| isActive | boolean | Indicates whether the user account is active. Used for login control and filtering inactive users. | ❌ |
| created_at | date | The timestamp when the user account was created. | ❌ |
| modified_at | date | The timestamp when the user account was last updated. | ❌ |
| pin | any | A security PIN associated with the user account. Stores a numeric or alphanumeric PIN. | ❌ |
| isMfaEnabled | boolean | Indicates whether multi-factor authentication (MFA) is enabled. Flag for whether Multi-Factor Authentication is enabled (1) or not (0). | ❌ |
| mfaSecretCode | string | The secret code used for multi-factor authentication. Secret key used to generate TOTP | ❌ |
| additionalInfo | object | Any extra information related to the user. | ❌ |
| avatar | object | avatar field | ❌ |
| recoveryCodes | array | Backup 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"
}