User Model
The User Model – is a base model for showing platform user parameters. Models fields are presented in the table (Table 4.13), with an example below (Listing 4.9).
Table 4.13 – Fields of User Model
1
uuid
uuid v4, string
required
Main identifier of user
2
string
required
User email
3
first_name
string
optional
User first name, if it set
4
last_name
string
optional
User last name, if it set
5
status
Status Model
optional
Current user status
6
company
Account Model
optional
If End User does not exist
7
end_user
End User Model
optional
Main account for user
8
is_two_factor_enabled
boolean
optional
Shows user 2FA state
9
timezone
string
optional
Shows user setting timezone
10
format_date_time
string
optional
User format for date and time
11
format_number
string
optional
User format for numbers
Listing 4.9 – Example of User Model (JSON)
{
"uuid": "b528bcb9-86cf-2d72834d02ab",
"email": "[email protected]",
"first_name": "John",
"last_name": "Johnson",
"status": {...//Status Model},
"company": {...//Account Model},
"end_user": {...//End User Model},
"is_two_factor_enabled": true,
"timezone": "UTC",
"format_date_time": "Y-m-d H:i:s",
"format_number": "fr-CA"
}
Last updated