Skip to content

@machb/user-entities v0.0.2-SNAPSHOT


@machb/user-entities / Profile

Class: Profile

Defined in: Profile.ts:24

Represents a user profile within the system, extending the User entity.

The Profile class adds additional attributes and behaviors to the base User entity, providing extended support for user-specific details such as contact information, preferences, and personalized data. It is designed for use in applications requiring detailed representations of user accounts.

Usage

const profile = new Profile();
profile.firstName = "Jane";
profile.lastName = "Doe";
profile.gender = "Female";
profile.dateOfBirth = new Date("1990-01-01");
profile.homeAddress = new ContactInfo();
profile.homeAddress.city = "San Francisco";
profile.member = true;

Extends

Constructors

Constructor

new Profile(): Profile

Returns

Profile

Inherited from

User.constructor

Properties

autoLogin

autoLogin: boolean = false

Defined in: Profile.ts:50

Indicates whether the user has enabled auto-login functionality.


country?

optional country: string

Defined in: User.ts:51

The user's country of residence.

Inherited from

User.country


dateOfBirth

dateOfBirth: Date | null = null

Defined in: Profile.ts:33

The user's date of birth.


description

description: string | null = null

Defined in: Profile.ts:55

A brief description or note about the user.


email?

optional email: string

Defined in: User.ts:24

The user's email address. Typically used as the primary credential for authentication.

Inherited from

User.email


firstName?

optional firstName: string

Defined in: User.ts:41

The user's first name.

Inherited from

User.firstName


gender

gender: string | null = null

Defined in: Profile.ts:28

The user's gender (e.g., "Male", "Female", "Non-Binary", etc.).


generatedPassword

generatedPassword: boolean = false

Defined in: Profile.ts:60

Indicates whether the user has a system-generated password.


homeAddress

homeAddress: ContactInfo | null = null

Defined in: Profile.ts:39

The user's primary home address. Uses the ContactInfo entity to store address details.


id?

optional id: string

Defined in: User.ts:36

Unique identifier for the user. Often used internally for database or system references.

Inherited from

User.id


lastName?

optional lastName: string

Defined in: User.ts:46

The user's last name.

Inherited from

User.lastName


locale

locale: string | null = null

Defined in: Profile.ts:65

The user's locale or language preference (e.g., "en-US").


member

member: boolean = false

Defined in: Profile.ts:70

Indicates whether the user is marked as a member.


middleName

middleName: string | null = null

Defined in: Profile.ts:75

The user's middle name, if applicable.


password?

optional password: string

Defined in: User.ts:30

The user's password. Should be stored securely and never be directly exposed.

Inherited from

User.password


realmId

realmId: string | null = null

Defined in: Profile.ts:80

Identifies the realm or tenant where the user belongs, for systems with multi-tenancy.


receiveEmail

receiveEmail: string | null = null

Defined in: Profile.ts:85

The user's preference for receiving email communication (e.g., "Yes", "No").


shippingAddress

shippingAddress: ContactInfo | null = null

Defined in: Profile.ts:45

The user's preferred shipping address. Uses the ContactInfo entity to store address details.

https://www.free-Counters.org