Overview
The User models define data structures for user profiles, user management, and user-related operations. These models represent passenger information throughout the app.Core User Models
User
Complete user model with all details. Used for detailed user views and the logged-in user’s profile.Unique user identifier
User’s full name
User’s email address
Whether the email address has been verified
User’s phone number
Whether the phone number has been verified
Type of user. One of:
'passenger', 'driver', or 'admin'URL to user’s profile picture
User’s current geographic location
Array of vehicle IDs associated with the user
User account status. One of:
'active', 'inactive', or 'banned'User’s preferred language code (e.g., ‘es’, ‘en’)
ISO 8601 timestamp when user accepted terms of service
ISO 8601 timestamp when user accepted privacy policy
ISO 8601 timestamp of user creation
ISO 8601 timestamp of user deletion (if soft-deleted)
UserProfile
Public or basic user profile. Used for displaying user information in the app.User identifier
User’s name
User’s email
User’s phone number
Profile picture URL
User type enum value
Current location as GeoJSON Point
ISO 8601 creation timestamp
UserListItem
Lightweight user model for displaying in lists.User identifier
User’s name
User’s email
Profile picture URL
User type
User account status
Phone number
ISO 8601 creation timestamp
User Payload Models
CreateUserPayload
Payload for creating a new user profile.User’s full name
User’s email address
User type (passenger, driver, admin)
User’s phone number
Initial account status
Profile picture URL
User’s current location
Associated vehicle ID
Preferred language code
ISO 8601 timestamp of terms acceptance
ISO 8601 timestamp of privacy policy acceptance
UpdateUserPayload
Payload for updating an existing user profile. All fields are optional.RegisterUserPayload
Complete payload for user registration, combining profile and credentials.User profile data
Authentication credentials
ChangePasswordPayload
Payload for changing user password.The new passwordExample:
'MiNuevaContrasenaSegura123!'Password confirmation (must match newPassword)Example:
'MiNuevaContrasenaSegura123!'CreateAuthCredentialsPayload
Payload for creating user authentication credentials.Authentication method. One of:
'local', 'google', 'facebook', or 'apple'User ID to associate credentials with
User password (required for local auth)
OAuth provider IDs
Whether multi-factor authentication is enabled
ISO 8601 timestamp of last password change
UpdateAuthCredentialsPayload
Payload for updating authentication credentials. All fields optional.Enums and Types
UserType
Defines the type/role of a user in the system.Passenger- Regular passenger userDriver- Driver user (not used in passenger app)Admin- Administrator user
UserStatus
Defines the current status of a user account.Active- User account is active and can use the appInactive- User account is temporarily inactiveBanned- User has been banned from the platform
AuthMethod
Defines available authentication methods.LOCAL- Email/password authenticationGOOGLE- Google OAuthFACEBOOK- Facebook OAuthAPPLE- Apple Sign In
AppAudience
Defines the application audience/platform.Supporting Types
Location
Geographic coordinates.Latitude coordinate
Longitude coordinate
OAuthProviders
OAuth provider identifiers.Google OAuth user ID
Facebook OAuth user ID
Apple OAuth user ID
PassengerPingDto
Payload for sending passenger location updates.Latitude
Longitude
Location accuracy in meters
ISO 8601 timestamp when location was captured
Force saving this location update
Usage Examples
Creating a User Profile
Registering a New User
Updating User Profile
Changing Password
Working with User Types
Related
- Auth Models - Authentication and session models
- Trip Models - Trip-related models