April 2020
Intermediate to advanced
716 pages
18h 55m
English
The user model will define the user details to be stored in the MongoDB database, and also handle user-related business logic such as password encryption and user data validation. The user model for this skeletal version will be basic with support for the following attributes:
| Field name | Type |
Description |
|
name |
String | Required field to store the user's name. |
|
|
String | Required unique field to store the user's email and identify each account (only one account allowed per unique email). |
|
password |
String | A required field for authentication. The database will store the encrypted password and not the actual string for security purposes. |
|
created |
Date | Automatically generated timestamp when a new user account is created. ... |