ia-common 1.0.1-beta.58 → 1.0.1-beta.59

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.
@@ -1,5 +1,5 @@
1
1
  import { OrganizationStatus, OrganizationType } from "../@enum";
2
- import { IOrganizationEntity } from "../@type";
2
+ import { IOrganizationEntity, IRegistrationEntity } from "../@type";
3
3
  export declare class OrganizationEntityModel implements IOrganizationEntity {
4
4
  id: number;
5
5
  name: string;
@@ -22,6 +22,7 @@ export declare class OrganizationEntityModel implements IOrganizationEntity {
22
22
  createdBy: number;
23
23
  updatedBy: number;
24
24
  constructor(data: IOrganizationEntity);
25
+ createOrganizationInstanceByRegistrationEntity(registrationEntity: IRegistrationEntity): IOrganizationEntity;
25
26
  getPanFolderName(): string;
26
27
  getPanFileName(): string;
27
28
  getGstFolderName(): string | undefined;
@@ -1,10 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrganizationEntityModel = void 0;
4
+ var _enum_1 = require("../@enum");
4
5
  var OrganizationEntityModel = /** @class */ (function () {
5
6
  function OrganizationEntityModel(data) {
6
7
  Object.assign(this, data);
7
8
  }
9
+ OrganizationEntityModel.prototype.createOrganizationInstanceByRegistrationEntity = function (registrationEntity) {
10
+ var organizationEntity = {};
11
+ organizationEntity.name = "";
12
+ organizationEntity.email = null;
13
+ organizationEntity.contactNo = null;
14
+ organizationEntity.type = "";
15
+ organizationEntity.panNo = "";
16
+ organizationEntity.panFilePath = "";
17
+ organizationEntity.gstNo = null;
18
+ organizationEntity.gstFilePath = null;
19
+ organizationEntity.deed = null;
20
+ organizationEntity.deedFilePath = "";
21
+ organizationEntity.status = _enum_1.OrganizationStatus.REGISTRATION_APPROVED;
22
+ organizationEntity.registrationId = registrationEntity.id;
23
+ organizationEntity.sebiCertificate = "";
24
+ organizationEntity.validateFrom = "";
25
+ organizationEntity.validateTo = "";
26
+ organizationEntity.createdBy = registrationEntity.createdBy;
27
+ organizationEntity.createdOn = new Date();
28
+ organizationEntity.updatedBy = registrationEntity.createdBy;
29
+ organizationEntity.updatedOn = new Date();
30
+ return organizationEntity;
31
+ };
8
32
  OrganizationEntityModel.prototype.getPanFolderName = function () {
9
33
  return this.panFilePath.split("/").slice(3, 5)[0];
10
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ia-common",
3
- "version": "1.0.1-beta.58",
3
+ "version": "1.0.1-beta.59",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",