-
Notifications
You must be signed in to change notification settings - Fork 0
User Model
Sulabh Mehta (Dominik) edited this page Nov 10, 2023
·
1 revision
The User model represents a user in the system. This refers to user collection in MongoDB. It has the following fields:
-
ID: The user's unique identifier. -
Username: The user's username. -
Name: The user's name. -
Email: The user's email address. -
Role: The user's role (e.g., admin, user, etc.). [To be implemented yet.] -
Provider: The provider that the user authenticated with (e.g., Google, Facebook, etc.). -
ProviderAccountId: The user's ID with the provider.
Following is how a typical document in user collection would look like:
{
"_id": "ObjectId('56cb91bdc3464f14678934ca')",
"username": "johndoe",
"name": "John Doe",
"email": "john.doe@example.com",
"role": "user",
"provider": "google",
"providerAccountId": "1234567890"
}