API Docs
Users
2min
This document provides an overview of the users model used in a the database.
This schema defines the structure for user documents in the database, specifying various fields, and their types.
- name: String The name of the user.
- email: String The email address of the user. This field is unique and stored in lowercase.
- password: String The hashed password of the user.
- image: String A URL or path to the user's profile image.
- type: String The role or type of user.
- active_status: Boolean Indicates whether the user is currently active.
- creation_type: String Specifies how the user was created (e.g., "MANUAL_INPUT").
- api_updated_at: Date Timestamp of the last API update made for this user.
- last_login: Date The date and time of the user's last login.
- login_timezone: String The timezone of the user's last login.
- last_activity_time: Date The timestamp of the user's last recorded activity.
- last_activity_timezone: String The timezone of the user's last activity.
- access_token: String The user's access token for authentication.
- refresh_token: String The user's refresh token for authentication.
- is_domo_updated: Boolean A flag indicating if the user's data is updated in Domo.
- disabled_sso_auto_updated: Boolean Flag to disable automatic updates via SSO.
- disabled_dataset_auto_updated: Boolean Flag to disable automatic updates from datasets.
- custom_fields: [customFieldSchema] An array of custom fields associated with the user. Each field has the following structure:
- custom_field_id: ObjectId Reference to a custom field defined in the user_custom_fields collection.
- value: String The value for the custom field.
- created_by: ObjectId Reference to the user who created this user entry.
- updated_by: ObjectId Reference to the user who last updated this entry.
- deactivated_at: Date The timestamp when the user was deactivated.
The schema automatically tracks creation and update times using Mongoose's timestamps option:
- created_at: The timestamp of when the user was created.
- updated_at: The timestamp of the most recent update to the user's data.
This sub-schema defines the structure for custom fields associated with users:
- custom_field_id: A reference to a custom field ID in the user_custom_fields collection.
- value: The value of the custom field for the user.
Updated 09 Oct 2024
Did this page help you?