Module: models/User

User Model for Satoshi Showdown. This model defines the structure and constraints for user profiles within the platform. It accommodates both registered and guest users, tracking a variety of user-specific information such as credentials, roles, activity, and associations with other entities like events and transactions. The model is crucial for managing user identities, authentication, authorization, and user-related functionalities across the platform.

Source:

Requires

  • module:mongoose
  • module:uuid

Members

(inner, constant) User :UserModel

Type:
  • UserModel
Source:

Type Definitions

UserModel

User model based on the defined schema. Represents a user's profile in the Satoshi Showdown platform, encompassing critical information necessary for the user's interaction and participation within the system. This model serves as a foundational element for user management, security, and engagement features of the platform.

Type:
Source:

UserSchema

Schema definition for the User model. Specifies the structure, data types, and validation rules for fields associated with a user profile. Fields include identifiers, credentials, activity timestamps, roles, and relationships to other entities like events and transactions. This schema ensures proper data organization and integrity for user-related operations in the platform.

Type:
  • Object
Properties:
Name Type Description
userId string

Unique identifier for the user.

username string

Username for the user, required and unique.

email string

Email address of the user, unique but not required for all users.

passwordHash string

Hashed password for security purposes.

lastActive Date

Timestamp of the user's last activity.

role string

Role of the user within the platform.

profileInfo Object

Additional profile information, structure can vary.

ipAddress string

IP address of the user, used for tracking or security purposes.

organization mongoose.Schema.Types.ObjectId

Reference to an Organization, if applicable.

Source: