ia-common 1.1.1-beta.1 → 1.1.1-beta.3
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/src/@enum.d.ts +3 -1
- package/build/src/@enum.js +3 -1
- package/build/src/enum/error.key.enum.d.ts +3 -0
- package/build/src/enum/error.key.enum.js +7 -0
- package/build/src/enum/relation-type.enum.d.ts +4 -0
- package/build/src/enum/relation-type.enum.js +8 -0
- package/build/src/enum/user/{user-type.enum.d.ts → user-role.enum.d.ts} +1 -1
- package/build/src/enum/user/user-role.enum.js +13 -0
- package/build/src/interface/api/advior-user-interface.d.ts +4 -0
- package/build/src/interface/api/{create-bank-details.interface.d.ts → bank-details-create-dto..interface.d.ts} +5 -2
- package/build/src/interface/api/bank-details-update.dto.interface.d.ts +24 -0
- package/build/src/interface/api/configuration-update-dto.interface.d.ts +13 -0
- package/build/src/interface/api/configurations-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/corporate-actions-create.dto.d.ts +7 -0
- package/build/src/interface/api/corporate-actions-update.dto.d.ts +19 -0
- package/build/src/interface/api/create-bulk-advice-using-csv.interface.d.ts +3 -3
- package/build/src/interface/api/create-corporate-action-advice.interface.d.ts +1 -1
- package/build/src/interface/api/create-user-dto.interface.d.ts +17 -0
- package/build/src/interface/api/create-user-dto.interface.js +8 -0
- package/build/src/interface/api/delete-bank-details-by-id.interface.d.ts +1 -5
- package/build/src/interface/api/{create-advice.interface.d.ts → equity-advice-create-dto.interface.d.ts} +4 -4
- package/build/src/interface/api/{update-advice.interface.d.ts → equity-advice-update-dto..d.ts} +3 -3
- package/build/src/interface/api/get-advice-by-id.interface.d.ts +2 -2
- package/build/src/interface/api/get-advice-by-ids-status.inteface.d.ts +2 -2
- package/build/src/interface/api/get-organization-by-id.interface.d.ts +2 -3
- package/build/src/interface/api/get-registration-by-id.interface.d.ts +5 -5
- package/build/src/interface/api/get-registration-with-organization-owners.interface.d.ts +3 -3
- package/build/src/interface/api/get-user-entities-by-advisor-id-type.interface.d.ts +1 -2
- package/build/src/interface/api/get-user-entities-by-filter.interface.d.ts +3 -0
- package/build/src/interface/api/index.d.ts +45 -55
- package/build/src/interface/api/index.js +45 -55
- package/build/src/interface/api/mutual-fund-advice-create-dto.interface.d.ts +13 -0
- package/build/src/interface/api/mutual-fund-advice-update-dto.interface.d.ts +11 -0
- package/build/src/interface/api/mutual-funds-create-dto.interface.d.ts +8 -0
- package/build/src/interface/api/nfo-advice-create-dto.interface.d.ts +13 -0
- package/build/src/interface/api/nfo-advice-update-dto.interface.d.ts +10 -0
- package/build/src/interface/api/nfo-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/organization-create-dto.interface.d.ts +5 -0
- package/build/src/interface/api/organization-update-dto.interface.d.ts +31 -0
- package/build/src/interface/api/permission.create.dto.interface.d.ts +3 -0
- package/build/src/interface/api/permission.update.dto.interface.d.ts +3 -0
- package/build/src/interface/api/{create-pricing-plan.interface.d.ts → pricing-plan-create.dto.interface.d.ts} +7 -1
- package/build/src/interface/api/pricing-plan-update-dto.interface.d.ts +22 -0
- package/build/src/interface/api/registration-create-dto.interface.d.ts +7 -0
- package/build/src/interface/api/registration-update-dto.interface.d.ts +9 -0
- package/build/src/interface/api/role-create-dto.interface.d.ts +3 -0
- package/build/src/interface/api/role-update-dto.interface.d.ts +3 -0
- package/build/src/interface/api/role.permission.mapping.create.dto.interface.d.ts +5 -0
- package/build/src/interface/api/role.permission.mapping.delete.dto.interface.d.ts +3 -0
- package/build/src/interface/api/role.permission.mapping.response.d.ts +5 -0
- package/build/src/interface/api/role.permission.mapping.update.dto.interface.d.ts +3 -0
- package/build/src/interface/api/subscription-create.dto.interface.d.ts +10 -0
- package/build/src/interface/api/subscription-update.dto.interface.d.ts +13 -0
- package/build/src/interface/api/update-corporate-action-advice.interface.d.ts +1 -1
- package/build/src/interface/api/update-user-dto.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/buy-back-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/create-bonus-stock.interface.d.ts +4 -0
- package/build/src/interface/corporate-actions/delisting-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/dividend-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/fpo-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/index.d.ts +12 -0
- package/build/src/interface/corporate-actions/index.js +12 -0
- package/build/src/interface/corporate-actions/ipo-corporate-action.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/ofs-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/open-offer-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/right-issues-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/split-bonus-corporate-action.interface.d.ts +7 -2
- package/build/src/interface/corporate-actions/split-stock-corporate-actions.interface.d.ts +1 -2
- package/build/src/interface/corporate-actions/update-bonus-stock.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-buy-back.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-delisting.interface.d.ts +5 -0
- package/build/src/interface/corporate-actions/update-dividend.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-fpo.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-ipo.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-ofs.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-open-offer.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-right-issue.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-split-bonus.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-split-bonus.interface.js +2 -0
- package/build/src/interface/corporate-actions/update-split-stock.interface.d.ts +6 -0
- package/build/src/interface/corporate-actions/update-split-stock.interface.js +2 -0
- package/build/src/interface/entity/advice-entity.interface.d.ts +2 -5
- package/build/src/interface/entity/advisor-user-mapping-entity.interface.d.ts +3 -1
- package/build/src/interface/entity/bank-details-entity.interface.d.ts +5 -2
- package/build/src/interface/entity/configurations-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/corporate-action-advice-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/corporate-actions-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/cron-job-entity.interface.d.ts +2 -1
- package/build/src/interface/entity/entity-utils.interface.d.ts +54 -8
- package/build/src/interface/entity/entity-utils.interface.js +19 -16
- package/build/src/interface/entity/index.d.ts +5 -1
- package/build/src/interface/entity/index.js +5 -1
- package/build/src/interface/entity/mutual-fund-advice-entity.interface.d.ts +5 -5
- package/build/src/interface/entity/mutual-funds-entity.interface.d.ts +11 -11
- package/build/src/interface/entity/{nfp-advice-entity.interface.d.ts → nfo-advice-entity.interface.d.ts} +3 -3
- package/build/src/interface/entity/nfo-advice-entity.interface.js +2 -0
- package/build/src/interface/entity/nfo-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/organization-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/permission.entity.interface.d.ts +9 -0
- package/build/src/interface/entity/permission.entity.interface.js +2 -0
- package/build/src/interface/entity/pricing-plan-entity.interface.d.ts +3 -3
- package/build/src/interface/entity/registration-entity.d.ts +2 -2
- package/build/src/interface/entity/relation-config.interface.d.ts +16 -0
- package/build/src/interface/entity/relation-config.interface.js +2 -0
- package/build/src/interface/entity/role.entity.interface.d.ts +9 -0
- package/build/src/interface/entity/role.entity.interface.js +2 -0
- package/build/src/interface/entity/role.permission.mapping.entity.interface.d.ts +8 -0
- package/build/src/interface/entity/role.permission.mapping.entity.interface.js +2 -0
- package/build/src/interface/entity/subscription-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/user-entity.interface.d.ts +5 -4
- package/build/src/interface/update-user-info.interface.d.ts +4 -0
- package/build/src/model/advisor-user-mapping-entity-model.d.ts +16 -0
- package/build/src/model/advisor-user-mapping-entity-model.js +28 -0
- package/build/src/model/bank-details-entity-model.d.ts +8 -5
- package/build/src/model/bank-details-entity-model.js +51 -3
- package/build/src/model/base.entity.model.d.ts +7 -10
- package/build/src/model/base.entity.model.js +13 -16
- package/build/src/model/configurations-entity-model.d.ts +9 -6
- package/build/src/model/configurations-entity-model.js +49 -5
- package/build/src/model/corporate-actions/bonus-corporate-action-model.d.ts +2 -2
- package/build/src/model/corporate-actions/buy-back-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/corporate-action-model.d.ts +12 -6
- package/build/src/model/corporate-actions/corporate-action-model.js +78 -5
- package/build/src/model/corporate-actions/corporate-actions-advice-model.d.ts +25 -0
- package/build/src/model/corporate-actions/corporate-actions-advice-model.js +37 -0
- package/build/src/model/corporate-actions/delisting-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/dividend-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/fpo-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/ipo-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/ofs-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/open-offer-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/right-issue-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/split-bonus-corporate-action-model.d.ts +4 -4
- package/build/src/model/corporate-actions/split-corporate-action-model.d.ts +4 -4
- package/build/src/model/cron-jobs-entity-model.d.ts +23 -0
- package/build/src/model/cron-jobs-entity-model.js +34 -0
- package/build/src/model/equity-advice-entity-model.d.ts +3 -3
- package/build/src/model/equity-advice-entity-model.js +46 -46
- package/build/src/model/index.d.ts +19 -10
- package/build/src/model/index.js +19 -10
- package/build/src/model/interface/entity.model.interface.d.ts +35 -11
- package/build/src/model/interface/entity.model.interface.js +187 -14
- package/build/src/model/mutual-fund-advice-entity.model.d.ts +27 -0
- package/build/src/model/mutual-fund-advice-entity.model.js +39 -0
- package/build/src/model/mutual-funds-entity.model.d.ts +28 -0
- package/build/src/model/mutual-funds-entity.model.js +40 -0
- package/build/src/model/nfo-advice-entity.model.d.ts +22 -0
- package/build/src/model/nfo-advice-entity.model.js +34 -0
- package/build/src/model/nfo-entity.model.d.ts +21 -0
- package/build/src/model/nfo-entity.model.js +33 -0
- package/build/src/model/organization-entity-model.d.ts +34 -8
- package/build/src/model/organization-entity-model.js +223 -29
- package/build/src/model/permission-entity-model.d.ts +18 -0
- package/build/src/model/permission-entity-model.js +30 -0
- package/build/src/model/pricing-plan-entity-model.d.ts +7 -4
- package/build/src/model/pricing-plan-entity-model.js +12 -1
- package/build/src/model/pricing-plan-model.d.ts +6 -3
- package/build/src/model/pricing-plan-model.js +113 -9
- package/build/src/model/registration-entity-model.d.ts +23 -0
- package/build/src/model/registration-entity-model.js +55 -0
- package/build/src/model/role-entity-model.d.ts +15 -0
- package/build/src/model/role-entity-model.js +27 -0
- package/build/src/model/role-permission-entity-model.d.ts +15 -0
- package/build/src/model/role-permission-entity-model.js +26 -0
- package/build/src/model/subscription-entity-model.d.ts +15 -7
- package/build/src/model/subscription-entity-model.js +119 -11
- package/build/src/model/user-entity-model.d.ts +15 -9
- package/build/src/model/user-entity-model.js +109 -12
- package/build/src/utils/helper.fn.utils.d.ts +70 -0
- package/build/src/utils/helper.fn.utils.js +98 -1
- package/package.json +1 -1
- package/build/src/enum/user/user-type.enum.js +0 -13
- package/build/src/interface/api/add-mutual-funds.interface.d.ts +0 -8
- package/build/src/interface/api/create-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-buy-back-interface.d.ts +0 -6
- package/build/src/interface/api/create-client.interface.d.ts +0 -12
- package/build/src/interface/api/create-delisting.interface.d.ts +0 -6
- package/build/src/interface/api/create-dividend-interface.d.ts +0 -6
- package/build/src/interface/api/create-fpo.interface.d.ts +0 -6
- package/build/src/interface/api/create-ipo.interface.d.ts +0 -6
- package/build/src/interface/api/create-mutual-fund-advice.interface.d.ts +0 -17
- package/build/src/interface/api/create-nfo-advice.interface.d.ts +0 -13
- package/build/src/interface/api/create-nfo.interface.d.ts +0 -12
- package/build/src/interface/api/create-ofs.interface.d.ts +0 -6
- package/build/src/interface/api/create-open-offer.interface.d.ts +0 -6
- package/build/src/interface/api/create-registration.interface.d.ts +0 -9
- package/build/src/interface/api/create-right-issue.interface.d.ts +0 -6
- package/build/src/interface/api/create-split-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-split-stock.interface.d.ts +0 -6
- package/build/src/interface/api/create-staff-dto.d.ts +0 -9
- package/build/src/interface/api/create-subscription.interface.d.ts +0 -18
- package/build/src/interface/api/update-bank-details.interface.d.ts +0 -18
- package/build/src/interface/api/update-bonus-stock.interface.d.ts +0 -6
- package/build/src/interface/api/update-buy-back.interface.d.ts +0 -6
- package/build/src/interface/api/update-configuration.interface.d.ts +0 -10
- package/build/src/interface/api/update-delisting.interface.d.ts +0 -5
- package/build/src/interface/api/update-dividend.interface.d.ts +0 -6
- package/build/src/interface/api/update-fpo.interface.d.ts +0 -6
- package/build/src/interface/api/update-ipo.interface.d.ts +0 -6
- package/build/src/interface/api/update-nfo-advice.interface.d.ts +0 -14
- package/build/src/interface/api/update-ofs.interface.d.ts +0 -6
- package/build/src/interface/api/update-open-offer.interface.d.ts +0 -6
- package/build/src/interface/api/update-organization.interface.d.ts +0 -23
- package/build/src/interface/api/update-pricing-plan.interface.d.ts +0 -13
- package/build/src/interface/api/update-registration.interface.d.ts +0 -8
- package/build/src/interface/api/update-right-issue.interface.d.ts +0 -6
- package/build/src/interface/api/update-split-bonus.interface.d.ts +0 -6
- package/build/src/interface/api/update-split-stock.interface.d.ts +0 -6
- package/build/src/interface/api/update-staff.dto.d.ts +0 -9
- package/build/src/interface/api/update-subscription.interface.d.ts +0 -11
- /package/build/src/interface/api/{add-mutual-funds.interface.js → advior-user-interface.js} +0 -0
- /package/build/src/interface/api/{create-advice.interface.js → bank-details-create-dto..interface.js} +0 -0
- /package/build/src/interface/api/{create-bank-details.interface.js → bank-details-update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-bonus-stock.interface.js → configuration-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-buy-back-interface.js → configurations-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-client.interface.js → corporate-actions-create.dto.js} +0 -0
- /package/build/src/interface/api/{create-delisting.interface.js → corporate-actions-update.dto.js} +0 -0
- /package/build/src/interface/api/{create-dividend-interface.js → equity-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-fpo.interface.js → equity-advice-update-dto..js} +0 -0
- /package/build/src/interface/api/{create-ipo.interface.js → get-user-entities-by-filter.interface.js} +0 -0
- /package/build/src/interface/api/{create-mutual-fund-advice.interface.js → mutual-fund-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-nfo-advice.interface.js → mutual-fund-advice-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-nfo.interface.js → mutual-funds-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-ofs.interface.js → nfo-advice-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-open-offer.interface.js → nfo-advice-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-pricing-plan.interface.js → nfo-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-registration.interface.js → organization-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-right-issue.interface.js → organization-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-split-bonus-stock.interface.js → permission.create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-split-stock.interface.js → permission.update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-staff-dto.js → pricing-plan-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-subscription.interface.js → pricing-plan-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-advice.interface.js → registration-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bank-details.interface.js → registration-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bonus-stock.interface.js → role-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-buy-back.interface.js → role-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-configuration.interface.js → role.permission.mapping.create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-delisting.interface.js → role.permission.mapping.delete.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-dividend.interface.js → role.permission.mapping.response.js} +0 -0
- /package/build/src/interface/api/{update-fpo.interface.js → role.permission.mapping.update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-ipo.interface.js → subscription-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-nfo-advice.interface.js → subscription-update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-ofs.interface.js → update-user-dto.interface.js} +0 -0
- /package/build/src/interface/{api/update-open-offer.interface.js → corporate-actions/create-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-organization.interface.js → corporate-actions/update-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-pricing-plan.interface.js → corporate-actions/update-buy-back.interface.js} +0 -0
- /package/build/src/interface/{api/update-registration.interface.js → corporate-actions/update-delisting.interface.js} +0 -0
- /package/build/src/interface/{api/update-right-issue.interface.js → corporate-actions/update-dividend.interface.js} +0 -0
- /package/build/src/interface/{api/update-split-bonus.interface.js → corporate-actions/update-fpo.interface.js} +0 -0
- /package/build/src/interface/{api/update-split-stock.interface.js → corporate-actions/update-ipo.interface.js} +0 -0
- /package/build/src/interface/{api/update-staff.dto.js → corporate-actions/update-ofs.interface.js} +0 -0
- /package/build/src/interface/{api/update-subscription.interface.js → corporate-actions/update-open-offer.interface.js} +0 -0
- /package/build/src/interface/{entity/nfp-advice-entity.interface.js → corporate-actions/update-right-issue.interface.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NFOAdviceStatus, NFOAdviceTransactionType } from "../../@enum";
|
|
2
|
+
import { EntityEnum, INFOAdviceEntity } from "../../@type";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class NFOAdviceEntityModel extends BaseEntityModel<EntityEnum.NFO_ADVICE> implements INFOAdviceEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
nfoId: number;
|
|
7
|
+
mutualFundName: string;
|
|
8
|
+
advisorOrgId: number;
|
|
9
|
+
transactionType: NFOAdviceTransactionType;
|
|
10
|
+
rationale?: string | undefined;
|
|
11
|
+
noteDocumentUrl: string | null;
|
|
12
|
+
videoUrl: string | null;
|
|
13
|
+
voiceUrl: string | null;
|
|
14
|
+
status: NFOAdviceStatus;
|
|
15
|
+
createdOn: number;
|
|
16
|
+
updatedOn: number;
|
|
17
|
+
createdBy: number;
|
|
18
|
+
updatedBy: number;
|
|
19
|
+
constructor();
|
|
20
|
+
static fromEntity(entity: INFOAdviceEntity): NFOAdviceEntityModel;
|
|
21
|
+
getRelationConfigs(): any;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NFOAdviceEntityModel = void 0;
|
|
4
|
+
const _enum_1 = require("../../@enum");
|
|
5
|
+
const _type_1 = require("../../@type");
|
|
6
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
7
|
+
class NFOAdviceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(_type_1.EntityEnum.NFO_ADVICE);
|
|
10
|
+
this.id = 0;
|
|
11
|
+
this.nfoId = 0;
|
|
12
|
+
this.mutualFundName = "";
|
|
13
|
+
this.advisorOrgId = 0;
|
|
14
|
+
this.transactionType = _enum_1.NFOAdviceTransactionType.AVOID;
|
|
15
|
+
this.rationale = "";
|
|
16
|
+
this.noteDocumentUrl = null;
|
|
17
|
+
this.videoUrl = null;
|
|
18
|
+
this.voiceUrl = null;
|
|
19
|
+
this.status = _enum_1.NFOAdviceStatus.ACTIVE;
|
|
20
|
+
this.createdOn = 0;
|
|
21
|
+
this.updatedOn = 0;
|
|
22
|
+
this.createdBy = 0;
|
|
23
|
+
this.updatedBy = 0;
|
|
24
|
+
}
|
|
25
|
+
static fromEntity(entity) {
|
|
26
|
+
const result = new NFOAdviceEntityModel();
|
|
27
|
+
Object.assign(result, entity);
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
getRelationConfigs() {
|
|
31
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.NFOAdviceEntityModel = NFOAdviceEntityModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MutualFundsType } from "../../@enum";
|
|
2
|
+
import { EntityEnum, INFOEntity } from "../../@type";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class NFOEntityModel extends BaseEntityModel<EntityEnum.NFO> implements INFOEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
mutualFundName: string;
|
|
7
|
+
type: MutualFundsType;
|
|
8
|
+
startDateCode: number;
|
|
9
|
+
endDateCode: number;
|
|
10
|
+
risk: string;
|
|
11
|
+
createdOn: number;
|
|
12
|
+
updatedOn: number;
|
|
13
|
+
createdBy: number;
|
|
14
|
+
updatedBy: number;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Factory: Convert API response → model instance
|
|
18
|
+
*/
|
|
19
|
+
static fromEntity(entity: INFOEntity): NFOEntityModel;
|
|
20
|
+
getRelationConfigs(): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NFOEntityModel = void 0;
|
|
4
|
+
const _enum_1 = require("../../@enum");
|
|
5
|
+
const _type_1 = require("../../@type");
|
|
6
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
7
|
+
class NFOEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(_type_1.EntityEnum.NFO);
|
|
10
|
+
this.id = 0;
|
|
11
|
+
this.mutualFundName = "";
|
|
12
|
+
this.type = _enum_1.MutualFundsType.EQUITY;
|
|
13
|
+
this.startDateCode = 0;
|
|
14
|
+
this.endDateCode = 0;
|
|
15
|
+
this.risk = "";
|
|
16
|
+
this.createdOn = 0;
|
|
17
|
+
this.updatedOn = 0;
|
|
18
|
+
this.createdBy = 0;
|
|
19
|
+
this.updatedBy = 0;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Factory: Convert API response → model instance
|
|
23
|
+
*/
|
|
24
|
+
static fromEntity(entity) {
|
|
25
|
+
const result = new NFOEntityModel();
|
|
26
|
+
Object.assign(result, entity);
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
getRelationConfigs() {
|
|
30
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.NFOEntityModel = NFOEntityModel;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OrganizationStatus, OrganizationType } from "../@enum";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { RegistrationEntityModel, UserEntityModel } from "../@model";
|
|
3
|
+
import { EntityEnum, EnumEntityType, IOrganizationEntity, RelationConfigs } from "../@type";
|
|
4
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
+
export declare class OrganizationEntityModel extends BaseEntityModel<EntityEnum.ORGANIZATION> implements IOrganizationEntity {
|
|
4
6
|
id: number;
|
|
5
7
|
name: string;
|
|
6
8
|
email: string | null;
|
|
@@ -17,20 +19,44 @@ export declare class OrganizationEntityModel implements IOrganizationEntity {
|
|
|
17
19
|
sebiCertificate: string;
|
|
18
20
|
validateFrom: string;
|
|
19
21
|
validateTo: string;
|
|
20
|
-
createdOn:
|
|
21
|
-
updatedOn:
|
|
22
|
+
createdOn: number;
|
|
23
|
+
updatedOn: number;
|
|
22
24
|
createdBy: number;
|
|
23
25
|
updatedBy: number;
|
|
24
26
|
remarks: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
users: UserEntityModel[];
|
|
28
|
+
constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Create model instance from entity
|
|
31
|
+
*/
|
|
32
|
+
static fromEntity(entity: IOrganizationEntity): OrganizationEntityModel;
|
|
33
|
+
/**
|
|
34
|
+
* Return relation configs (if any)
|
|
35
|
+
*/
|
|
36
|
+
getRelationConfigs(): any;
|
|
37
|
+
static fromRegistrationModel(registrationEntityModel: RegistrationEntityModel): OrganizationEntityModel;
|
|
38
|
+
/**
|
|
39
|
+
* Convert model instance to plain entity
|
|
40
|
+
*/
|
|
41
|
+
toEntity(): IOrganizationEntity;
|
|
42
|
+
/**
|
|
43
|
+
* Utility getters for file/folder names
|
|
44
|
+
*/
|
|
45
|
+
getPanFolderName(): string | undefined;
|
|
46
|
+
getPanFileName(): string | undefined;
|
|
29
47
|
getGstFolderName(): string | undefined;
|
|
30
48
|
getGstFileName(): string | undefined;
|
|
31
49
|
getDeedFolderName(): string | undefined;
|
|
32
50
|
getDeedFileName(): string | undefined;
|
|
33
51
|
getSebiCertificateFolderName(): string | undefined;
|
|
34
52
|
getSebiCertificateFileName(): string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Find organization by registrationId
|
|
55
|
+
*/
|
|
35
56
|
static findByRegistrationId(organizationEntities: IOrganizationEntity[], registrationId: number): IOrganizationEntity | undefined;
|
|
57
|
+
validateOwnersCountByOrganizationType(): void;
|
|
58
|
+
getUsersModels(): UserEntityModel[];
|
|
59
|
+
static relationConfigs: RelationConfigs<[
|
|
60
|
+
EntityEnum.USER
|
|
61
|
+
], EnumEntityType<EntityEnum.ORGANIZATION>>;
|
|
36
62
|
}
|
|
@@ -2,38 +2,112 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrganizationEntityModel = void 0;
|
|
4
4
|
const _enum_1 = require("../@enum");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
const relation_type_enum_1 = require("../enum/relation-type.enum");
|
|
6
|
+
const _model_1 = require("../@model");
|
|
7
|
+
const _type_1 = require("../@type");
|
|
8
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
9
|
+
class OrganizationEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(_type_1.EntityEnum.ORGANIZATION);
|
|
12
|
+
this.id = 0;
|
|
13
|
+
this.name = "";
|
|
14
|
+
this.email = null;
|
|
15
|
+
this.contactNo = null;
|
|
16
|
+
this.type = "";
|
|
17
|
+
this.panNo = "";
|
|
18
|
+
this.panFilePath = "";
|
|
19
|
+
this.gstNo = null;
|
|
20
|
+
this.gstFilePath = null;
|
|
21
|
+
this.deed = null;
|
|
22
|
+
this.deedFilePath = "";
|
|
23
|
+
this.status = _enum_1.OrganizationStatus.REGISTRATION_APPROVED;
|
|
24
|
+
this.registrationId = 0;
|
|
25
|
+
this.sebiCertificate = "";
|
|
26
|
+
this.validateFrom = "";
|
|
27
|
+
this.validateTo = "";
|
|
28
|
+
this.createdOn = 0;
|
|
29
|
+
this.updatedOn = 0;
|
|
30
|
+
this.createdBy = 0;
|
|
31
|
+
this.updatedBy = 0;
|
|
32
|
+
this.remarks = "";
|
|
31
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Create model instance from entity
|
|
36
|
+
*/
|
|
37
|
+
static fromEntity(entity) {
|
|
38
|
+
const result = new OrganizationEntityModel();
|
|
39
|
+
Object.assign(result, entity);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Return relation configs (if any)
|
|
44
|
+
*/
|
|
45
|
+
getRelationConfigs() {
|
|
46
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
47
|
+
}
|
|
48
|
+
static fromRegistrationModel(registrationEntityModel) {
|
|
49
|
+
const organizationModel = new OrganizationEntityModel();
|
|
50
|
+
organizationModel.name = "";
|
|
51
|
+
organizationModel.email = null;
|
|
52
|
+
organizationModel.contactNo = null;
|
|
53
|
+
organizationModel.type = "";
|
|
54
|
+
organizationModel.panNo = "";
|
|
55
|
+
organizationModel.panFilePath = "";
|
|
56
|
+
organizationModel.gstNo = null;
|
|
57
|
+
organizationModel.gstFilePath = null;
|
|
58
|
+
organizationModel.deed = null;
|
|
59
|
+
organizationModel.deedFilePath = "";
|
|
60
|
+
organizationModel.status = _enum_1.OrganizationStatus.REGISTRATION_APPROVED;
|
|
61
|
+
organizationModel.registrationId = registrationEntityModel.id;
|
|
62
|
+
organizationModel.sebiCertificate = "";
|
|
63
|
+
organizationModel.validateFrom = "";
|
|
64
|
+
organizationModel.validateTo = "";
|
|
65
|
+
organizationModel.createdBy = registrationEntityModel.createdBy;
|
|
66
|
+
organizationModel.createdOn = Date.now();
|
|
67
|
+
organizationModel.updatedBy = registrationEntityModel.createdBy;
|
|
68
|
+
organizationModel.updatedOn = Date.now();
|
|
69
|
+
organizationModel.remarks = "";
|
|
70
|
+
return organizationModel;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Convert model instance to plain entity
|
|
74
|
+
*/
|
|
75
|
+
toEntity() {
|
|
76
|
+
const entity = {
|
|
77
|
+
id: this.id,
|
|
78
|
+
name: this.name,
|
|
79
|
+
email: this.email,
|
|
80
|
+
contactNo: this.contactNo,
|
|
81
|
+
type: this.type,
|
|
82
|
+
panNo: this.panNo,
|
|
83
|
+
panFilePath: this.panFilePath,
|
|
84
|
+
gstNo: this.gstNo,
|
|
85
|
+
gstFilePath: this.gstFilePath,
|
|
86
|
+
deed: this.deed,
|
|
87
|
+
deedFilePath: this.deedFilePath,
|
|
88
|
+
status: this.status,
|
|
89
|
+
registrationId: this.registrationId,
|
|
90
|
+
sebiCertificate: this.sebiCertificate,
|
|
91
|
+
validateFrom: this.validateFrom,
|
|
92
|
+
validateTo: this.validateTo,
|
|
93
|
+
createdOn: this.createdOn,
|
|
94
|
+
updatedOn: this.updatedOn,
|
|
95
|
+
createdBy: this.createdBy,
|
|
96
|
+
updatedBy: this.updatedBy,
|
|
97
|
+
remarks: this.remarks,
|
|
98
|
+
};
|
|
99
|
+
return entity;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Utility getters for file/folder names
|
|
103
|
+
*/
|
|
32
104
|
getPanFolderName() {
|
|
33
|
-
|
|
105
|
+
var _a;
|
|
106
|
+
return (_a = this.panFilePath) === null || _a === void 0 ? void 0 : _a.split("/").slice(3, 5)[0];
|
|
34
107
|
}
|
|
35
108
|
getPanFileName() {
|
|
36
|
-
|
|
109
|
+
var _a;
|
|
110
|
+
return (_a = this.panFilePath) === null || _a === void 0 ? void 0 : _a.split("/").slice(3, 5)[1];
|
|
37
111
|
}
|
|
38
112
|
getGstFolderName() {
|
|
39
113
|
var _a;
|
|
@@ -59,8 +133,128 @@ class OrganizationEntityModel {
|
|
|
59
133
|
var _a;
|
|
60
134
|
return (_a = this.sebiCertificate) === null || _a === void 0 ? void 0 : _a.split("/").slice(3, 5)[1];
|
|
61
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Find organization by registrationId
|
|
138
|
+
*/
|
|
62
139
|
static findByRegistrationId(organizationEntities, registrationId) {
|
|
63
|
-
return organizationEntities.find((organizationEntity) => organizationEntity.registrationId
|
|
140
|
+
return organizationEntities.find((organizationEntity) => organizationEntity.registrationId === registrationId);
|
|
141
|
+
}
|
|
142
|
+
// static getEmptyOrganzationEntityByRegistrationEntity(
|
|
143
|
+
// registrationEntity: IRegistrationEntity
|
|
144
|
+
// ): IOrganizationEntity {
|
|
145
|
+
// return OrganizationEntityModel.fromRegistrationModel(registrationEntity);
|
|
146
|
+
// }
|
|
147
|
+
validateOwnersCountByOrganizationType() {
|
|
148
|
+
var _a;
|
|
149
|
+
const noOfOwners = (_a = this.users) === null || _a === void 0 ? void 0 : _a.filter((user) => user.role === _enum_1.UserRoleEnum.ADVISOR).length;
|
|
150
|
+
if (this.type === _enum_1.OrganizationType.PARTNERSHIP && noOfOwners <= 1) {
|
|
151
|
+
throw new _model_1.AppBadRequestException({
|
|
152
|
+
key: "organizationType",
|
|
153
|
+
message: [
|
|
154
|
+
"If the organization is a partnership, it must have a minimum of two owners.",
|
|
155
|
+
],
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
getUsersModels() {
|
|
160
|
+
return this.users;
|
|
64
161
|
}
|
|
65
162
|
}
|
|
66
163
|
exports.OrganizationEntityModel = OrganizationEntityModel;
|
|
164
|
+
OrganizationEntityModel.relationConfigs = [
|
|
165
|
+
{
|
|
166
|
+
name: _type_1.EntityEnum.USER,
|
|
167
|
+
relation: relation_type_enum_1.RelationType.MANY,
|
|
168
|
+
key: "users",
|
|
169
|
+
mapKeyConfig: {
|
|
170
|
+
relationKey: "organizationId",
|
|
171
|
+
key: "id",
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
];
|
|
175
|
+
// import { OrganizationStatus, OrganizationType } from "../@enum";
|
|
176
|
+
// import { IOrganizationEntity, IRegistrationEntity } from "../@type";
|
|
177
|
+
// export class OrganizationEntityModel implements IOrganizationEntity {
|
|
178
|
+
// id: number;
|
|
179
|
+
// name: string;
|
|
180
|
+
// email: string | null;
|
|
181
|
+
// contactNo: string | null;
|
|
182
|
+
// type: OrganizationType;
|
|
183
|
+
// panNo: string;
|
|
184
|
+
// panFilePath: string;
|
|
185
|
+
// gstNo: string | null;
|
|
186
|
+
// gstFilePath: string | null;
|
|
187
|
+
// deed: string | null;
|
|
188
|
+
// deedFilePath: string | null;
|
|
189
|
+
// status: OrganizationStatus;
|
|
190
|
+
// registrationId: number;
|
|
191
|
+
// sebiCertificate: string;
|
|
192
|
+
// validateFrom: string;
|
|
193
|
+
// validateTo: string;
|
|
194
|
+
// createdOn: Date;
|
|
195
|
+
// updatedOn: Date;
|
|
196
|
+
// createdBy: number;
|
|
197
|
+
// updatedBy: number;
|
|
198
|
+
// remarks: string;
|
|
199
|
+
// constructor(data: IOrganizationEntity) {
|
|
200
|
+
// Object.assign(this, data);
|
|
201
|
+
// }
|
|
202
|
+
// static getEntityInstanceByRegistrationEntity(
|
|
203
|
+
// registrationEntity: IRegistrationEntity
|
|
204
|
+
// ): IOrganizationEntity {
|
|
205
|
+
// const organizationEntity: IOrganizationEntity = {} as IOrganizationEntity;
|
|
206
|
+
// organizationEntity.name = "";
|
|
207
|
+
// organizationEntity.email = null;
|
|
208
|
+
// organizationEntity.contactNo = null;
|
|
209
|
+
// organizationEntity.type = "" as OrganizationType;
|
|
210
|
+
// organizationEntity.panNo = "";
|
|
211
|
+
// organizationEntity.panFilePath = "";
|
|
212
|
+
// organizationEntity.gstNo = null;
|
|
213
|
+
// organizationEntity.gstFilePath = null;
|
|
214
|
+
// organizationEntity.deed = null;
|
|
215
|
+
// organizationEntity.deedFilePath = "";
|
|
216
|
+
// organizationEntity.status = OrganizationStatus.REGISTRATION_APPROVED;
|
|
217
|
+
// organizationEntity.registrationId = registrationEntity.id;
|
|
218
|
+
// organizationEntity.sebiCertificate = "";
|
|
219
|
+
// organizationEntity.validateFrom = "";
|
|
220
|
+
// organizationEntity.validateTo = "";
|
|
221
|
+
// organizationEntity.createdBy = registrationEntity.createdBy;
|
|
222
|
+
// organizationEntity.createdOn = new Date();
|
|
223
|
+
// organizationEntity.updatedBy = registrationEntity.createdBy;
|
|
224
|
+
// organizationEntity.updatedOn = new Date();
|
|
225
|
+
// return organizationEntity;
|
|
226
|
+
// }
|
|
227
|
+
// getPanFolderName(): string {
|
|
228
|
+
// return this.panFilePath.split("/").slice(3, 5)[0];
|
|
229
|
+
// }
|
|
230
|
+
// getPanFileName(): string {
|
|
231
|
+
// return this.panFilePath.split("/").slice(3, 5)[1];
|
|
232
|
+
// }
|
|
233
|
+
// getGstFolderName(): string | undefined {
|
|
234
|
+
// return this.gstFilePath?.split("/").slice(3, 5)[0];
|
|
235
|
+
// }
|
|
236
|
+
// getGstFileName(): string | undefined {
|
|
237
|
+
// return this.gstFilePath?.split("/").slice(3, 5)[1];
|
|
238
|
+
// }
|
|
239
|
+
// getDeedFolderName(): string | undefined {
|
|
240
|
+
// return this.deedFilePath?.split("/").slice(3, 5)[0];
|
|
241
|
+
// }
|
|
242
|
+
// getDeedFileName(): string | undefined {
|
|
243
|
+
// return this.deedFilePath?.split("/").slice(3, 5)[1];
|
|
244
|
+
// }
|
|
245
|
+
// getSebiCertificateFolderName(): string | undefined {
|
|
246
|
+
// return this.sebiCertificate?.split("/").slice(3, 5)[0];
|
|
247
|
+
// }
|
|
248
|
+
// getSebiCertificateFileName(): string | undefined {
|
|
249
|
+
// return this.sebiCertificate?.split("/").slice(3, 5)[1];
|
|
250
|
+
// }
|
|
251
|
+
// static findByRegistrationId(
|
|
252
|
+
// organizationEntities: IOrganizationEntity[],
|
|
253
|
+
// registrationId: number
|
|
254
|
+
// ) {
|
|
255
|
+
// return organizationEntities.find(
|
|
256
|
+
// (organizationEntity) =>
|
|
257
|
+
// organizationEntity.registrationId == registrationId
|
|
258
|
+
// );
|
|
259
|
+
// }
|
|
260
|
+
// }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EntityEnum, IPermissionEntity } from "../@type";
|
|
2
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
3
|
+
export declare class PermissionEntityModel extends BaseEntityModel<EntityEnum.PERMISSION> implements IPermissionEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
organizationId: number;
|
|
8
|
+
createdOn: number;
|
|
9
|
+
updatedOn: number;
|
|
10
|
+
createdBy: number;
|
|
11
|
+
updatedBy: number;
|
|
12
|
+
constructor();
|
|
13
|
+
static fromEntity(entity: IPermissionEntity): PermissionEntityModel;
|
|
14
|
+
/**
|
|
15
|
+
* Return relation configs (if any)
|
|
16
|
+
*/
|
|
17
|
+
getRelationConfigs(): any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionEntityModel = void 0;
|
|
4
|
+
const _type_1 = require("../@type");
|
|
5
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
+
class PermissionEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(_type_1.EntityEnum.PERMISSION);
|
|
9
|
+
this.id = 0;
|
|
10
|
+
this.name = "";
|
|
11
|
+
this.description = "";
|
|
12
|
+
this.organizationId = 0;
|
|
13
|
+
this.createdOn = 0;
|
|
14
|
+
this.updatedOn = 0;
|
|
15
|
+
this.createdBy = 0;
|
|
16
|
+
this.updatedBy = 0;
|
|
17
|
+
}
|
|
18
|
+
static fromEntity(entity) {
|
|
19
|
+
const result = new PermissionEntityModel();
|
|
20
|
+
Object.assign(result, entity);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Return relation configs (if any)
|
|
25
|
+
*/
|
|
26
|
+
getRelationConfigs() {
|
|
27
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PermissionEntityModel = PermissionEntityModel;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { PricingPlanStatus } from "../@enum";
|
|
2
|
-
import { IBillingCycle, IGetPricingPlanByDateResponse, IPricingPlanEntity } from "../@type";
|
|
3
|
-
|
|
2
|
+
import { EntityEnum, IBillingCycle, IGetPricingPlanByDateResponse, IPricingPlanEntity } from "../@type";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class PricingPlanEntityModel extends BaseEntityModel<EntityEnum.PRICING_PLAN> implements IPricingPlanEntity {
|
|
4
5
|
id: number;
|
|
5
6
|
effectiveFrom: number;
|
|
6
7
|
effectiveTo: number;
|
|
7
8
|
status: PricingPlanStatus;
|
|
8
9
|
createdBy: number;
|
|
9
|
-
createdOn:
|
|
10
|
+
createdOn: number;
|
|
10
11
|
updatedBy: number;
|
|
11
|
-
updatedOn:
|
|
12
|
+
updatedOn: number;
|
|
12
13
|
basePrice: number;
|
|
13
14
|
billingCycle: string;
|
|
14
15
|
constructor(data: IPricingPlanEntity);
|
|
16
|
+
getRelationConfigs(): any;
|
|
17
|
+
static fromEntity(entity: IPricingPlanEntity): PricingPlanEntityModel;
|
|
15
18
|
toObject(): IGetPricingPlanByDateResponse;
|
|
16
19
|
static getBillingCycleString(billingCycle: IBillingCycle): string;
|
|
17
20
|
static validateNoOfMonthsByBillingCycle(billingCycle: IBillingCycle): void;
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BillingCycleModel = exports.PricingPlanEntityModel = void 0;
|
|
4
4
|
const _model_1 = require("../@model");
|
|
5
|
-
|
|
5
|
+
const _type_1 = require("../@type");
|
|
6
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
7
|
+
class PricingPlanEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
6
8
|
constructor(data) {
|
|
9
|
+
super(_type_1.EntityEnum.PRICING_PLAN);
|
|
7
10
|
Object.assign(this, data);
|
|
8
11
|
}
|
|
12
|
+
getRelationConfigs() {
|
|
13
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
14
|
+
}
|
|
15
|
+
static fromEntity(entity) {
|
|
16
|
+
const result = new PricingPlanEntityModel(entity);
|
|
17
|
+
Object.assign(result, entity);
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
9
20
|
toObject() {
|
|
10
21
|
const responseObj = {
|
|
11
22
|
id: this.id,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IGetPricingPlanByDateResponse, IPricingPlanModel, IBillingCycleObj } from "../@type";
|
|
2
|
-
|
|
1
|
+
import { IGetPricingPlanByDateResponse, IPricingPlanModel, IBillingCycleObj, IPricingPlanEntity, EntityEnum } from "../@type";
|
|
2
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
3
|
+
export declare class PricingPlanModel extends BaseEntityModel<EntityEnum.PRICING_PLAN> implements IPricingPlanModel {
|
|
3
4
|
id: number;
|
|
4
5
|
effectiveFromDate: number;
|
|
5
6
|
effectiveToDate: number;
|
|
@@ -7,7 +8,8 @@ export declare class PricingPlanModel implements IPricingPlanModel {
|
|
|
7
8
|
billingCycle: {
|
|
8
9
|
[key: string]: IBillingCycleObj;
|
|
9
10
|
};
|
|
10
|
-
constructor(data
|
|
11
|
+
constructor(data?: IGetPricingPlanByDateResponse);
|
|
12
|
+
getRelationConfigs(): any;
|
|
11
13
|
getBillingCycleKeys(): string[];
|
|
12
14
|
validateBillingCycleKey(key: string): void;
|
|
13
15
|
getNoOfSubscriptionDays(type: string): number;
|
|
@@ -18,4 +20,5 @@ export declare class PricingPlanModel implements IPricingPlanModel {
|
|
|
18
20
|
fromDateCode: number;
|
|
19
21
|
toDateCode: number;
|
|
20
22
|
};
|
|
23
|
+
static fromEntity(entity: IPricingPlanEntity): PricingPlanModel;
|
|
21
24
|
}
|