alapa
Version:
A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.
253 lines (252 loc) • 7.17 kB
TypeScript
import { Model } from "../../models";
/**
* Abstract model for an authenticatable user entity with various personal, security, and engagement properties.
* Used to store user-related data including login details, preferences, security, and audit information.
*/
export declare abstract class AuthenticatableModel extends Model {
/**
* The user's first name.
*/
firstName: string;
/**
* The user's last name.
*/
lastName: string;
/**
* The user's middle name (if applicable).
*/
middleName: string;
/**
* The user's current status (e.g., 'active', 'inactive', 'suspended').
*/
status: string;
/**
* The user's gender.
*/
gender: string;
/**
* The unique username for the user.
*/
username: string;
/**
* The unique email address of the user.
*/
email: string;
/**
* Indicates whether the user's email has been verified.
*/
emailVerified: boolean;
/**
* The hashed password of the user.
*/
password: string;
/**
* Token used for user login sessions.
*/
loginToken: string;
/**
* Token used for resetting the user's password.
*/
resetToken: string;
/**
* Expiry time for the password reset token.
*/
resetTokenExpiresTime: string;
/**
* The country of residence of the user.
*/
country: string;
/**
* The user's role (e.g., 'admin', 'user', 'moderator').
*/
role: string;
/**
* The unique phone number of the user.
*/
phoneNumber: string;
/**
* The user's home or office address.
*/
address: string;
/**
* The URL to the user's profile picture.
*/
profilePicture: string;
/**
* The user's date of birth.
*/
dateOfBirth: Date;
/**
* Indicates whether the user has enabled email notifications.
*/
isEmailNotificationsEnabled: boolean;
/**
* Indicates whether the user has enabled two-factor authentication.
*/
isTwoFactorEnabled: boolean;
/**
* The date and time when the user account was created.
*/
createdAt: Date;
/**
* The date and time when the user account was last updated.
*/
updatedAt: Date;
/**
* Timestamp for soft deletion of the user account.
*/
deletedAt: Date;
/**
* Indicates whether the user's account is active.
*/
isActive: boolean;
/**
* The timestamp of the last login by the user.
*/
lastLoginAt: Date;
/**
* The number of failed login attempts made by the user.
*/
failedLoginAttempts: number;
/**
* The timestamp indicating when the user's account will be unlocked after too many failed login attempts.
*/
lockoutExpiresAt: Date;
/**
* The user's preferred language for the platform.
*/
languagePreference: string;
/**
* The timezone of the user, useful for scheduling events or activities.
*/
timezone: string;
/**
* The current subscription status of the user (e.g., 'free', 'premium').
*/
subscriptionStatus: string;
/**
* The specific subscription plan the user is on (e.g., 'basic', 'enterprise').
*/
subscriptionPlan: string;
/**
* A list of the user's social media profiles or links.
*/
socialMediaLinks: string;
/**
* A short description or "about" section where the user can introduce themselves or share relevant details.
* This can be used to describe the user's interests, profession, or any personal information.
*/
aboutYourself: string;
/**
* The user's personal or business website URL.
*/
websiteUrl: string;
/**
* The secret used for generating one-time passwords (OTP) for two-factor authentication.
*/
otpSecret: string;
/**
* The timestamp of the last password change by the user.
*/
lastPasswordChangeAt: Date;
/**
* The name of the external authentication provider, if the user authenticated via an external service (e.g., 'google', 'facebook').
*/
externalAuthProvider: string;
/**
* The unique identifier from the external authentication provider.
*/
externalAuthId: string;
/**
* Whether the user has opted in to receive marketing emails.
*/
emailOptIn: boolean;
/**
* Whether the user has opted in to receive SMS notifications or phone-based alerts.
*/
phoneOptIn: boolean;
/**
* Whether the user has enabled push notifications for mobile or web apps.
*/
pushNotificationsEnabled: boolean;
/**
* Flag for whether the user account is marked as deleted.
*/
isDeleted: boolean;
/**
* The referral code generated for the user, used in referral programs.
*/
referralCode: string;
/**
* The ID or username of the user who referred the current user.
*/
referredBy: string;
/**
* The timestamp of when the user accepted the terms and conditions.
*/
termsAcceptedAt: Date;
/**
* The timestamp of when the user accepted the privacy policy.
*/
privacyPolicyAcceptedAt: Date;
/**
* The type of user account (e.g., 'personal', 'business').
*/
accountType: string;
/**
* The user's preferred method of communication (e.g., 'email', 'phone').
*/
preferredContactMethod: string;
/**
* The timestamp of the most recent activity by the user on the platform.
*/
lastActivityAt: Date;
/**
* The verification status of the user's account (e.g., 'verified', 'pending', 'rejected').
*/
accountVerificationStatus: string;
/**
* Recovery codes for two-factor authentication in case the user loses their authentication method.
*/
twoFactorRecoveryCodes: string;
/**
* Whether the user has installed the mobile app for push notifications and other interactions.
*/
mobileAppInstalled: boolean;
/**
* The method of login used by the user (e.g., 'email', 'google', 'facebook').
*/
loginMethod: string;
/**
* The timestamp of when the user last saw a notification from the platform.
*/
lastNotificationSeenAt: Date;
/**
* The timestamp indicating when the user's account will be unlocked after it was locked (e.g., due to security issues).
*/
accountLockedUntil: Date;
/**
* Whether the user has been verified (e.g., email verification, admin verification).
*/
isVerified: boolean;
/**
* Whether the user has given feedback or filled out a survey.
*/
feedbackGiven: boolean;
/**
* The total number of support tickets opened by the user.
*/
customerSupportTicketCount: number;
/**
* Whether the user has opted in for marketing or promotional messages.
*/
marketingOptIn: boolean;
/**
* Reason for blocking the user
*/
blockReason: string;
/**
* Indicates whether the user is a VIP customer with special privileges or benefits.
*/
isVIP: boolean;
}