ia-common 1.0.1-beta.61 → 1.0.1-beta.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/@model.d.ts
CHANGED
package/build/@model.js
CHANGED
|
@@ -18,3 +18,4 @@ __exportStar(require("./model/pricing-plan-entity-model"), exports);
|
|
|
18
18
|
__exportStar(require("./model/subscribed-pricing-plan-model"), exports);
|
|
19
19
|
__exportStar(require("./exception/app-badrequest.exception"), exports);
|
|
20
20
|
__exportStar(require("./model/organization-entity-model"), exports);
|
|
21
|
+
__exportStar(require("./model/user-entity-model"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UserStatus, UserType } from "../@enum";
|
|
2
|
+
import { IRegistrationEntity, IUserEntity } from "../@type";
|
|
3
|
+
export declare class UserEntityModel implements IUserEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
firstname: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
password: string;
|
|
8
|
+
email: string;
|
|
9
|
+
status: UserStatus;
|
|
10
|
+
isEmailVerified: boolean;
|
|
11
|
+
isMobileVerified: boolean;
|
|
12
|
+
isAccountVerified: boolean;
|
|
13
|
+
requireNewPassword: boolean;
|
|
14
|
+
type: UserType;
|
|
15
|
+
registrationId: number;
|
|
16
|
+
organizationId: number;
|
|
17
|
+
imageUrl: string | null;
|
|
18
|
+
createdOn: Date;
|
|
19
|
+
updatedOn: Date;
|
|
20
|
+
createdBy: number;
|
|
21
|
+
updatedBy: number;
|
|
22
|
+
constructor(userEntity: IUserEntity);
|
|
23
|
+
static getEntityInstanceByRegistrationEntityOrganizationId(registrationEntity: IRegistrationEntity, hashPassword: string, organizationId: number): IUserEntity;
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserEntityModel = void 0;
|
|
4
|
+
var _enum_1 = require("../@enum");
|
|
5
|
+
var UserEntityModel = /** @class */ (function () {
|
|
6
|
+
function UserEntityModel(userEntity) {
|
|
7
|
+
Object.assign(this, userEntity);
|
|
8
|
+
}
|
|
9
|
+
UserEntityModel.getEntityInstanceByRegistrationEntityOrganizationId = function (registrationEntity, hashPassword, organizationId) {
|
|
10
|
+
var userEntity = {};
|
|
11
|
+
userEntity.firstname = registrationEntity.name;
|
|
12
|
+
userEntity.email = registrationEntity.email;
|
|
13
|
+
userEntity.phone = registrationEntity.contact;
|
|
14
|
+
userEntity.password = hashPassword;
|
|
15
|
+
userEntity.requireNewPassword = true;
|
|
16
|
+
userEntity.isAccountVerified = false;
|
|
17
|
+
userEntity.isEmailVerified = false;
|
|
18
|
+
userEntity.isMobileVerified = false;
|
|
19
|
+
userEntity.status = _enum_1.UserStatus.REGISTRATION_APPROVED;
|
|
20
|
+
userEntity.type = _enum_1.UserType.ADVISOR;
|
|
21
|
+
userEntity.createdBy = registrationEntity.createdBy;
|
|
22
|
+
userEntity.updatedBy = registrationEntity.createdBy;
|
|
23
|
+
userEntity.updatedOn = new Date();
|
|
24
|
+
userEntity.createdOn = new Date();
|
|
25
|
+
userEntity.registrationId = registrationEntity.id;
|
|
26
|
+
userEntity.organizationId = organizationId;
|
|
27
|
+
return userEntity;
|
|
28
|
+
};
|
|
29
|
+
return UserEntityModel;
|
|
30
|
+
}());
|
|
31
|
+
exports.UserEntityModel = UserEntityModel;
|