Class: UserEntity

Entity.UserEntity(idopt, emailopt, passwordopt, firstNameopt, lastNameopt, birthdayopt, isMaleopt, loginAtopt, createdAtopt, updatedAtopt, labelopt)

User entity.

Constructor

new UserEntity(idopt, emailopt, passwordopt, firstNameopt, lastNameopt, birthdayopt, isMaleopt, loginAtopt, createdAtopt, updatedAtopt, labelopt)

Parameters:
Name Type Attributes Default Description
id string <optional>
null Category UUID.
email string <optional>
'' User e-mail. Size: 2-256 characters.
password string <optional>
'' User password. Size: 3-256 characters. Notive, this server will be never returned by server.
firstName string <optional>
'' User first name.
lastName string <optional>
'' User last name.
birthday Date <optional>
new Date() User birthday.
isMale boolean <optional>
true User gender where: [true] male, [false] female.
loginAt Date <optional>
new Date() Last login date.
createdAt Date <optional>
new Date() Creation date.
updatedAt Date <optional>
null Last update Date.
label String <optional>
'' A valid label using the following rule: first name and last name or email (sent only by API).
Author:
  • Bruno Morceli - pirofagista@gmail.com
Source:

Extends

Members

birthday

Properties:
Name Type Description
birthday Date User birthday.
Source:

createdAt

Properties:
Name Type Description
createdAt Date Creation date.
Source:

email

Properties:
Name Type Description
email string User e-mail. Size: 2-256 characters.
Source:

firstName

Properties:
Name Type Description
firstName string User first name.
Source:

id

Properties:
Name Type Description
id string Category UUID.
Source:

isMale

Properties:
Name Type Description
isMale boolean User gender where: [true] male, [false] female.
Source:

label

Properties:
Name Type Description
label String A valid label using the following rule: first name and last name or email (sent only by API).
Source:

lastName

Properties:
Name Type Description
lastName string User last name.
Source:

loginAt

Properties:
Name Type Description
loginAt Date Last login date.
Source:

password

Properties:
Name Type Description
password string User password. Size: 3-256 characters. Notive, this server will be never returned by server.
Source:

updatedAt

Properties:
Name Type Description
updatedAt Date Last update Date.
Source:

Methods

setData(rawData) → {this}

Set all fields of a object.
Parameters:
Name Type Description
rawData object Raw data containing all object information.
Inherited From:
Source:
Returns:
Current context.
Type
this

toJSON() → {object}

Create a new JavaScript Object Literal containing all class properties.
Inherited From:
Source:
Returns:
Type
object