ia-common 1.1.1-beta.0 → 1.1.1-beta.2
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 +1 -0
- package/build/src/@enum.js +1 -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/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 +37 -55
- package/build/src/interface/api/index.js +37 -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/{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/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-stock.interface.d.ts +6 -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 +45 -7
- package/build/src/interface/entity/entity-utils.interface.js +15 -15
- package/build/src/interface/entity/index.d.ts +2 -1
- package/build/src/interface/entity/index.js +2 -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-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/organization-entity.interface.d.ts +2 -2
- 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/subscription-entity.interface.d.ts +2 -2
- package/build/src/interface/entity/user-entity.interface.d.ts +2 -2
- 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/index.d.ts +8 -2
- package/build/src/model/index.js +8 -2
- package/build/src/model/interface/entity.model.interface.d.ts +35 -11
- package/build/src/model/interface/entity.model.interface.js +178 -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/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/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 +12 -7
- package/build/src/model/user-entity-model.js +108 -11
- package/build/src/utils/helper.fn.utils.d.ts +69 -0
- package/build/src/utils/helper.fn.utils.js +89 -1
- package/package.json +1 -1
- 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-registration.interface.js +0 -2
- 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-staff.dto.js +0 -2
- package/build/src/interface/api/update-subscription.interface.d.ts +0 -11
- package/build/src/interface/api/update-subscription.interface.js +0 -2
- package/build/src/interface/entity/nfp-advice-entity.interface.js +0 -2
- /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 → pricing-plan-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-split-stock.interface.js → pricing-plan-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-staff-dto.js → registration-create-dto.interface.js} +0 -0
- /package/build/src/interface/api/{create-subscription.interface.js → registration-update-dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-advice.interface.js → subscription-create.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bank-details.interface.js → subscription-update.dto.interface.js} +0 -0
- /package/build/src/interface/api/{update-bonus-stock.interface.js → update-user-dto.interface.js} +0 -0
- /package/build/src/interface/{api/update-buy-back.interface.js → corporate-actions/create-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-configuration.interface.js → corporate-actions/update-bonus-stock.interface.js} +0 -0
- /package/build/src/interface/{api/update-delisting.interface.js → corporate-actions/update-buy-back.interface.js} +0 -0
- /package/build/src/interface/{api/update-dividend.interface.js → corporate-actions/update-delisting.interface.js} +0 -0
- /package/build/src/interface/{api/update-fpo.interface.js → corporate-actions/update-dividend.interface.js} +0 -0
- /package/build/src/interface/{api/update-ipo.interface.js → corporate-actions/update-fpo.interface.js} +0 -0
- /package/build/src/interface/{api/update-nfo-advice.interface.js → corporate-actions/update-ipo.interface.js} +0 -0
- /package/build/src/interface/{api → corporate-actions}/update-ofs.interface.js +0 -0
- /package/build/src/interface/{api → corporate-actions}/update-open-offer.interface.js +0 -0
- /package/build/src/interface/{api → corporate-actions}/update-right-issue.interface.js +0 -0
- /package/build/src/interface/{api → corporate-actions}/update-split-bonus.interface.js +0 -0
- /package/build/src/interface/{api → corporate-actions}/update-split-stock.interface.js +0 -0
- /package/build/src/interface/{api/update-organization.interface.js → entity/nfo-advice-entity.interface.js} +0 -0
- /package/build/src/interface/{api/update-pricing-plan.interface.js → entity/relation-config.interface.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MutualFundsType } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface IMutualFundsEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface IMutualFundsEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
schemeName: string;
|
|
6
|
-
risk
|
|
7
|
-
navRegular
|
|
8
|
-
navDirect
|
|
9
|
-
oneYearReturnRegular
|
|
10
|
-
oneYearReturnDirect
|
|
11
|
-
threeYearReturnRegular
|
|
12
|
-
threeYearReturnDirect
|
|
13
|
-
fiveYearReturnRegular
|
|
14
|
-
fiveYearReturnDirect
|
|
6
|
+
risk?: string;
|
|
7
|
+
navRegular?: number;
|
|
8
|
+
navDirect?: number;
|
|
9
|
+
oneYearReturnRegular?: number;
|
|
10
|
+
oneYearReturnDirect?: number;
|
|
11
|
+
threeYearReturnRegular?: number;
|
|
12
|
+
threeYearReturnDirect?: number;
|
|
13
|
+
fiveYearReturnRegular?: number;
|
|
14
|
+
fiveYearReturnDirect?: number;
|
|
15
15
|
dailyAUM: number;
|
|
16
16
|
type: MutualFundsType;
|
|
17
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { NFOAdviceStatus, NFOAdviceTransactionType } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface INFOAdviceEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface INFOAdviceEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
nfoId: number;
|
|
6
6
|
mutualFundName: string;
|
|
7
7
|
advisorOrgId: number;
|
|
8
8
|
transactionType: NFOAdviceTransactionType;
|
|
9
|
-
rationale
|
|
9
|
+
rationale?: string;
|
|
10
10
|
noteDocumentUrl: string | null;
|
|
11
11
|
videoUrl: string | null;
|
|
12
12
|
voiceUrl: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutualFundsType } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface INFOEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface INFOEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
mutualFundName: string;
|
|
6
6
|
type: MutualFundsType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OrganizationStatus } from "../../enum/organization/organization-status.enum";
|
|
2
2
|
import { OrganizationType } from "../../enum/organization/organization-type.enum";
|
|
3
|
-
import {
|
|
4
|
-
export interface IOrganizationEntity extends
|
|
3
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
4
|
+
export interface IOrganizationEntity extends IAuditColumnEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
email: string | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PricingPlanStatus } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface IPricingPlanEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface IPricingPlanEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
effectiveFrom: number;
|
|
6
|
-
effectiveTo
|
|
6
|
+
effectiveTo?: number;
|
|
7
7
|
status: PricingPlanStatus;
|
|
8
8
|
basePrice: number;
|
|
9
9
|
billingCycle: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RegistrationStatus } from "../../enum/user/registration-status.enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface IRegistrationEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface IRegistrationEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
contact: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RelationType } from "../../@enum";
|
|
2
|
+
import { EntityEnum, EnumEntityType } from "./entity-utils.interface";
|
|
3
|
+
type SourcePath<T> = (keyof T & string) | `${string}.${string}`;
|
|
4
|
+
export type IRelationConfig<T extends EntityEnum, K extends EnumEntityType<EntityEnum>> = {
|
|
5
|
+
name: T;
|
|
6
|
+
relation: RelationType;
|
|
7
|
+
key: string;
|
|
8
|
+
mapKeyConfig: {
|
|
9
|
+
relationKey: SourcePath<EnumEntityType<T>>;
|
|
10
|
+
key: keyof K;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type RelationConfigs<T extends readonly EntityEnum[], E extends EnumEntityType<EntityEnum>> = {
|
|
14
|
+
[K in keyof T]: T[K] extends EntityEnum ? IRelationConfig<T[K], E> : never;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SubscriptionStatus } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export interface ISubscriptionEntity extends
|
|
2
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
3
|
+
export interface ISubscriptionEntity extends IAuditColumnEntity {
|
|
4
4
|
id: number;
|
|
5
5
|
fromDateCode: number;
|
|
6
6
|
toDateCode: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UserStatus } from "../../enum/user/user-status.enum";
|
|
2
2
|
import { UserType } from "../../enum/user/user-type.enum";
|
|
3
|
-
import {
|
|
4
|
-
export interface IUserEntity extends
|
|
3
|
+
import { IAuditColumnEntity } from "./audit-column-entity.interface";
|
|
4
|
+
export interface IUserEntity extends IAuditColumnEntity {
|
|
5
5
|
id: number;
|
|
6
6
|
firstname: string;
|
|
7
7
|
phone: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OwnerOperationType, UserStatus } from "../@enum";
|
|
2
|
+
import { IUserEntity } from "./entity";
|
|
2
3
|
import { IUploadedMulterFile } from "./upload-multer-file.interface";
|
|
3
4
|
export interface IUserInfo {
|
|
4
5
|
id?: number;
|
|
@@ -14,3 +15,6 @@ export interface IUserInfo {
|
|
|
14
15
|
requiredNewPassword?: boolean;
|
|
15
16
|
image?: IUploadedMulterFile | string;
|
|
16
17
|
}
|
|
18
|
+
export interface IUserInfoDtoValidationData {
|
|
19
|
+
userEntity: IUserEntity;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AdvisorUserMappingType } from "../@enum";
|
|
2
|
+
import { EntityEnum, IAdvisorUserMappingEntity } from "../@type";
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class AdvisorUserMappingEntityModel extends BaseEntityModel<EntityEnum.ADVISOR_USER_MAPPING> implements IAdvisorUserMappingEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
advisorOrgId: number;
|
|
7
|
+
userId: number;
|
|
8
|
+
type: AdvisorUserMappingType;
|
|
9
|
+
createdOn: number;
|
|
10
|
+
updatedOn: number;
|
|
11
|
+
createdBy: number;
|
|
12
|
+
updatedBy: number;
|
|
13
|
+
constructor();
|
|
14
|
+
static fromEntity(entity: IAdvisorUserMappingEntity): AdvisorUserMappingEntityModel;
|
|
15
|
+
getRelationConfigs(): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdvisorUserMappingEntityModel = 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 AdvisorUserMappingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(_type_1.EntityEnum.ADVISOR_USER_MAPPING);
|
|
10
|
+
this.id = 0;
|
|
11
|
+
this.advisorOrgId = 0;
|
|
12
|
+
this.userId = 0;
|
|
13
|
+
this.type = _enum_1.AdvisorUserMappingType.CLIENT; // default if needed
|
|
14
|
+
this.createdOn = 0;
|
|
15
|
+
this.updatedOn = 0;
|
|
16
|
+
this.createdBy = 1;
|
|
17
|
+
this.updatedBy = 1;
|
|
18
|
+
}
|
|
19
|
+
static fromEntity(entity) {
|
|
20
|
+
const result = new AdvisorUserMappingEntityModel();
|
|
21
|
+
Object.assign(result, entity);
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
getRelationConfigs() {
|
|
25
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.AdvisorUserMappingEntityModel = AdvisorUserMappingEntityModel;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IBankDetailEntity } from "../@type";
|
|
2
|
-
|
|
1
|
+
import { IBankDetailEntity, EntityEnum } from "../@type";
|
|
2
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
3
|
+
export declare class BankDetailsEntityModel extends BaseEntityModel<EntityEnum.BANK_DETAIL> implements IBankDetailEntity {
|
|
3
4
|
id: number;
|
|
4
5
|
bankName: string;
|
|
5
6
|
accountNo: string;
|
|
@@ -9,11 +10,13 @@ export declare class BankDetailsEntityModel implements IBankDetailEntity {
|
|
|
9
10
|
bankAddress: string;
|
|
10
11
|
branch: string;
|
|
11
12
|
accountName: string;
|
|
12
|
-
createdOn:
|
|
13
|
-
updatedOn:
|
|
13
|
+
createdOn: number;
|
|
14
|
+
updatedOn: number;
|
|
14
15
|
createdBy: number;
|
|
15
16
|
updatedBy: number;
|
|
16
|
-
constructor(
|
|
17
|
+
constructor();
|
|
18
|
+
static fromEntity(entity: IBankDetailEntity): BankDetailsEntityModel;
|
|
19
|
+
getRelationConfigs(): any;
|
|
17
20
|
getQrCodeFolderName(): string | undefined;
|
|
18
21
|
getQrCodeFileName(): string | undefined;
|
|
19
22
|
}
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BankDetailsEntityModel = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const _type_1 = require("../@type");
|
|
5
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
6
|
+
class BankDetailsEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(_type_1.EntityEnum.BANK_DETAIL);
|
|
9
|
+
this.id = 0;
|
|
10
|
+
this.bankName = "";
|
|
11
|
+
this.accountNo = "";
|
|
12
|
+
this.ifscCode = "";
|
|
13
|
+
this.upiId = "";
|
|
14
|
+
this.qrCode = null;
|
|
15
|
+
this.bankAddress = "";
|
|
16
|
+
this.branch = "";
|
|
17
|
+
this.accountName = "";
|
|
18
|
+
this.createdOn = 0;
|
|
19
|
+
this.updatedOn = 0;
|
|
20
|
+
this.createdBy = 0;
|
|
21
|
+
this.updatedBy = 0;
|
|
22
|
+
}
|
|
23
|
+
static fromEntity(entity) {
|
|
24
|
+
const result = new BankDetailsEntityModel();
|
|
25
|
+
Object.assign(result, entity);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
getRelationConfigs() {
|
|
29
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
7
30
|
}
|
|
8
31
|
getQrCodeFolderName() {
|
|
9
32
|
var _a;
|
|
@@ -15,3 +38,28 @@ class BankDetailsEntityModel {
|
|
|
15
38
|
}
|
|
16
39
|
}
|
|
17
40
|
exports.BankDetailsEntityModel = BankDetailsEntityModel;
|
|
41
|
+
// import { IBankDetailEntity } from "../@type";
|
|
42
|
+
// export class BankDetailsEntityModel implements IBankDetailEntity {
|
|
43
|
+
// id: number;
|
|
44
|
+
// bankName: string;
|
|
45
|
+
// accountNo: string;
|
|
46
|
+
// ifscCode: string;
|
|
47
|
+
// upiId: string;
|
|
48
|
+
// qrCode: string | null;
|
|
49
|
+
// bankAddress: string;
|
|
50
|
+
// branch: string;
|
|
51
|
+
// accountName: string;
|
|
52
|
+
// createdOn: Date;
|
|
53
|
+
// updatedOn: Date;
|
|
54
|
+
// createdBy: number;
|
|
55
|
+
// updatedBy: number;
|
|
56
|
+
// constructor(bankDetailEntity: IBankDetailEntity) {
|
|
57
|
+
// Object.assign(this, bankDetailEntity);
|
|
58
|
+
// }
|
|
59
|
+
// getQrCodeFolderName(): string | undefined {
|
|
60
|
+
// return this.qrCode?.split("/").slice(3, 5)[0];
|
|
61
|
+
// }
|
|
62
|
+
// getQrCodeFileName(): string | undefined {
|
|
63
|
+
// return this.qrCode?.split("/").slice(3, 5)[1];
|
|
64
|
+
// }
|
|
65
|
+
// }
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export declare abstract class BaseEntityModel<T extends EntityEnum | VirtualEntityEnum> {
|
|
7
|
-
protected entityName: T;
|
|
1
|
+
import { EntityModelIndexMap } from "../@type";
|
|
2
|
+
import { EntityEnum, EntityIndexMap } from "../interface/entity.utils.interface";
|
|
3
|
+
export declare abstract class BaseEntityModel<T extends EntityEnum> {
|
|
4
|
+
readonly entityName: T;
|
|
8
5
|
constructor(entityName: T);
|
|
9
6
|
abstract getRelationConfigs(): any[];
|
|
10
|
-
populateRelationsByIndex(
|
|
11
|
-
static populateRelationsForEntities(
|
|
12
|
-
populateRelations(
|
|
7
|
+
populateRelationsByIndex(entityModelIndexMap: EntityModelIndexMap): void;
|
|
8
|
+
static populateRelationsForEntities(entityModelIndexMap: EntityModelIndexMap, entityType: EntityEnum): void;
|
|
9
|
+
populateRelations(entityModelIndexMap: EntityModelIndexMap): void;
|
|
13
10
|
overwrite(entityIndexMap: EntityIndexMap, indexKey?: string): this;
|
|
14
11
|
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseEntityModel =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
RelationType["ONE"] = "one";
|
|
7
|
-
RelationType["MANY"] = "many";
|
|
8
|
-
})(RelationType || (exports.RelationType = RelationType = {}));
|
|
3
|
+
exports.BaseEntityModel = void 0;
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
const _enum_1 = require("../@enum");
|
|
9
6
|
class BaseEntityModel {
|
|
10
7
|
constructor(entityName) {
|
|
11
8
|
this.entityName = entityName;
|
|
12
9
|
}
|
|
13
|
-
populateRelationsByIndex(
|
|
10
|
+
populateRelationsByIndex(entityModelIndexMap) {
|
|
14
11
|
for (const relationConfig of this.getRelationConfigs() || []) {
|
|
15
12
|
const thisMappingKey = relationConfig.mapKeyConfig.key;
|
|
16
13
|
const relatedMappingKey = relationConfig.mapKeyConfig.relationKey;
|
|
17
14
|
const thisKey = relationConfig.key;
|
|
18
15
|
// console.log('Populating relation for', relationConfig.name, 'on', this.entityName, relationConfig);
|
|
19
16
|
// debugger;
|
|
20
|
-
if (relationConfig.relation === RelationType.ONE) {
|
|
21
|
-
const relatedEntities =
|
|
17
|
+
if (relationConfig.relation === _enum_1.RelationType.ONE) {
|
|
18
|
+
const relatedEntities = entityModelIndexMap[relationConfig.name] || {};
|
|
22
19
|
if (Object.is(relatedEntities, null))
|
|
23
20
|
continue;
|
|
24
21
|
let foundRelatedEntities = [];
|
|
@@ -56,9 +53,9 @@ class BaseEntityModel {
|
|
|
56
53
|
}
|
|
57
54
|
this[thisKey] = foundRelatedEntities[0];
|
|
58
55
|
}
|
|
59
|
-
else if (relationConfig.relation === RelationType.MANY) {
|
|
56
|
+
else if (relationConfig.relation === _enum_1.RelationType.MANY) {
|
|
60
57
|
this[thisKey] = [];
|
|
61
|
-
const relatedEntities =
|
|
58
|
+
const relatedEntities = entityModelIndexMap[relationConfig.name] || {};
|
|
62
59
|
for (const relatedEntity of Object.values(relatedEntities)) {
|
|
63
60
|
if (relatedEntity[relatedMappingKey] === this[thisMappingKey]) {
|
|
64
61
|
this[thisKey].push(relatedEntity);
|
|
@@ -67,13 +64,13 @@ class BaseEntityModel {
|
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
66
|
}
|
|
70
|
-
static populateRelationsForEntities(
|
|
71
|
-
for (const key of Object.keys(
|
|
72
|
-
const entity =
|
|
73
|
-
entity.populateRelationsByIndex(
|
|
67
|
+
static populateRelationsForEntities(entityModelIndexMap, entityType) {
|
|
68
|
+
for (const key of Object.keys(entityModelIndexMap[entityType] || {})) {
|
|
69
|
+
const entity = entityModelIndexMap[entityType][key];
|
|
70
|
+
entity.populateRelationsByIndex(entityModelIndexMap);
|
|
74
71
|
}
|
|
75
72
|
}
|
|
76
|
-
populateRelations(
|
|
73
|
+
populateRelations(entityModelIndexMap) {
|
|
77
74
|
this.populateRelationsByIndex(entityIndexMap);
|
|
78
75
|
}
|
|
79
76
|
overwrite(entityIndexMap, indexKey = "id") {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { IConfigurationsEntity } from "../@type";
|
|
1
|
+
import { EntityEnum, IConfigurationsEntity } from "../@type";
|
|
2
2
|
import { Configuration } from "../enum/configuration.enum";
|
|
3
|
-
|
|
3
|
+
import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
+
export declare class ConfigurationsEntityModel extends BaseEntityModel<EntityEnum.CONFIGURATION> implements IConfigurationsEntity {
|
|
4
5
|
id: number;
|
|
5
6
|
key: Configuration;
|
|
6
7
|
value: string;
|
|
7
8
|
description: string;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
text: string;
|
|
10
|
+
createdOn: number;
|
|
11
|
+
updatedOn: number;
|
|
10
12
|
createdBy: number;
|
|
11
13
|
updatedBy: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
constructor();
|
|
15
|
+
static fromEntity(entity: IConfigurationsEntity): ConfigurationsEntityModel;
|
|
14
16
|
isCronJobKey(): boolean;
|
|
15
17
|
static findByKey(configurationEntities: IConfigurationsEntity[], key: Configuration): IConfigurationsEntity | undefined;
|
|
18
|
+
getRelationConfigs(): any;
|
|
16
19
|
}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ConfigurationsEntityModel = void 0;
|
|
4
|
+
const _type_1 = require("../@type");
|
|
4
5
|
const configuration_enum_1 = require("../enum/configuration.enum");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const base_entity_model_1 = require("./base.entity.model");
|
|
7
|
+
class ConfigurationsEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(_type_1.EntityEnum.CONFIGURATION);
|
|
10
|
+
this.id = 0;
|
|
11
|
+
this.key = "";
|
|
12
|
+
this.value = "";
|
|
13
|
+
this.description = "";
|
|
14
|
+
this.text = "";
|
|
15
|
+
this.createdOn = 0;
|
|
16
|
+
this.updatedOn = 0;
|
|
17
|
+
this.createdBy = 0;
|
|
18
|
+
this.updatedBy = 0;
|
|
19
|
+
}
|
|
20
|
+
static fromEntity(entity) {
|
|
21
|
+
const result = new ConfigurationsEntityModel();
|
|
22
|
+
Object.assign(result, entity);
|
|
23
|
+
return result;
|
|
8
24
|
}
|
|
9
25
|
isCronJobKey() {
|
|
10
26
|
return configuration_enum_1.Configuration.CronJobsConfigurationsKeys(this.key);
|
|
@@ -12,5 +28,33 @@ class ConfigurationsModel {
|
|
|
12
28
|
static findByKey(configurationEntities, key) {
|
|
13
29
|
return configurationEntities.find((configurationEntity) => configurationEntity.key === key);
|
|
14
30
|
}
|
|
31
|
+
getRelationConfigs() {
|
|
32
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
33
|
+
}
|
|
15
34
|
}
|
|
16
|
-
exports.
|
|
35
|
+
exports.ConfigurationsEntityModel = ConfigurationsEntityModel;
|
|
36
|
+
// export class ConfigurationsModel implements IConfigurationsEntity {
|
|
37
|
+
// id: number;
|
|
38
|
+
// key: Configuration;
|
|
39
|
+
// value: string;
|
|
40
|
+
// description: string;
|
|
41
|
+
// createdOn: number;
|
|
42
|
+
// updatedOn: number;
|
|
43
|
+
// createdBy: number;
|
|
44
|
+
// updatedBy: number;
|
|
45
|
+
// text: string;
|
|
46
|
+
// constructor(data: IConfigurationsEntity) {
|
|
47
|
+
// Object.assign(this, data);
|
|
48
|
+
// }
|
|
49
|
+
// isCronJobKey(): boolean {
|
|
50
|
+
// return Configuration.CronJobsConfigurationsKeys(this.key);
|
|
51
|
+
// }
|
|
52
|
+
// static findByKey(
|
|
53
|
+
// configurationEntities: IConfigurationsEntity[],
|
|
54
|
+
// key: Configuration
|
|
55
|
+
// ): IConfigurationsEntity | undefined {
|
|
56
|
+
// return configurationEntities.find(
|
|
57
|
+
// (configurationEntity) => configurationEntity.key === key
|
|
58
|
+
// );
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
@@ -8,8 +8,8 @@ export declare class BonusCorporateActionModel implements IBonusCorporateAction,
|
|
|
8
8
|
type: CorporateActionsType;
|
|
9
9
|
status: CorporateActionsStatus;
|
|
10
10
|
id: number;
|
|
11
|
-
createdOn:
|
|
12
|
-
updatedOn:
|
|
11
|
+
createdOn: number;
|
|
12
|
+
updatedOn: number;
|
|
13
13
|
createdBy: number;
|
|
14
14
|
updatedBy: number;
|
|
15
15
|
constructor(entity: ICorporateActionsEntity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuyBackType, CorporateActionsStatus, CorporateActionsType } from "../../@enum";
|
|
2
|
-
import {
|
|
3
|
-
export declare class BuyBackCorporateActionModel implements
|
|
2
|
+
import { IBuyBackCorporateActionCreateDtoData, ICorporateActionsEntity, ICorporateEntityOmitData } from "../../@type";
|
|
3
|
+
export declare class BuyBackCorporateActionModel implements IBuyBackCorporateActionCreateDtoData, ICorporateEntityOmitData {
|
|
4
4
|
priceRange: string;
|
|
5
5
|
startDate: number;
|
|
6
6
|
endDate: number;
|
|
@@ -10,8 +10,8 @@ export declare class BuyBackCorporateActionModel implements IBuyBackCorporateAct
|
|
|
10
10
|
status: CorporateActionsStatus;
|
|
11
11
|
buyBackType: BuyBackType;
|
|
12
12
|
id: number;
|
|
13
|
-
createdOn:
|
|
14
|
-
updatedOn:
|
|
13
|
+
createdOn: number;
|
|
14
|
+
updatedOn: number;
|
|
15
15
|
createdBy: number;
|
|
16
16
|
updatedBy: number;
|
|
17
17
|
constructor(entity: ICorporateActionsEntity);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CorporateActionsStatus, CorporateActionsType } from "../../@enum";
|
|
2
|
-
import { ICorporateActionsEntity } from "../../@type";
|
|
2
|
+
import { EntityEnum, ICorporateActionsEntity } from "../../@type";
|
|
3
|
+
import { BaseEntityModel } from "../base.entity.model";
|
|
3
4
|
import { BonusCorporateActionModel } from "./bonus-corporate-action-model";
|
|
4
5
|
import { BuyBackCorporateActionModel } from "./buy-back-corporate-action-model";
|
|
5
6
|
import { DelistingCorporateActionModel } from "./delisting-corporate-action-model";
|
|
@@ -11,18 +12,23 @@ import { OpenOfferCorporateActionModel } from "./open-offer-corporate-action-mod
|
|
|
11
12
|
import { RightIssueCorporateActionModel } from "./right-issue-corporate-action-model";
|
|
12
13
|
import { SplitBonusCorporateActionModel } from "./split-bonus-corporate-action-model";
|
|
13
14
|
import { SplitCorporateActionModel } from "./split-corporate-action-model";
|
|
14
|
-
export declare class
|
|
15
|
+
export declare class CorporateActionsEntityModel extends BaseEntityModel<EntityEnum.CORPORATE_ACTIONS> implements ICorporateActionsEntity {
|
|
15
16
|
id: number;
|
|
16
17
|
data: string;
|
|
17
18
|
companyName: string;
|
|
18
19
|
recordDate: number;
|
|
19
20
|
type: CorporateActionsType;
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
status: CorporateActionsStatus;
|
|
22
|
+
createdOn: number;
|
|
23
|
+
updatedOn: number;
|
|
22
24
|
createdBy: number;
|
|
23
25
|
updatedBy: number;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* Factory to convert from plain API entity
|
|
29
|
+
*/
|
|
30
|
+
static fromEntity(entity: ICorporateActionsEntity): CorporateActionsEntityModel;
|
|
31
|
+
getRelationConfigs(): any;
|
|
26
32
|
getFPOModel(): FPOCorporateActionModel;
|
|
27
33
|
getDividendModel(): DividendCorporateActionModel;
|
|
28
34
|
getBuyBackModel(): BuyBackCorporateActionModel;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CorporateActionsEntityModel = void 0;
|
|
4
|
+
const _enum_1 = require("../../@enum");
|
|
5
|
+
const _type_1 = require("../../@type");
|
|
6
|
+
const base_entity_model_1 = require("../base.entity.model");
|
|
4
7
|
const bonus_corporate_action_model_1 = require("./bonus-corporate-action-model");
|
|
5
8
|
const buy_back_corporate_action_model_1 = require("./buy-back-corporate-action-model");
|
|
6
9
|
const delisting_corporate_action_model_1 = require("./delisting-corporate-action-model");
|
|
@@ -12,10 +15,32 @@ const open_offer_corporate_action_model_1 = require("./open-offer-corporate-acti
|
|
|
12
15
|
const right_issue_corporate_action_model_1 = require("./right-issue-corporate-action-model");
|
|
13
16
|
const split_bonus_corporate_action_model_1 = require("./split-bonus-corporate-action-model");
|
|
14
17
|
const split_corporate_action_model_1 = require("./split-corporate-action-model");
|
|
15
|
-
class
|
|
16
|
-
constructor(
|
|
17
|
-
|
|
18
|
+
class CorporateActionsEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(_type_1.EntityEnum.CORPORATE_ACTIONS);
|
|
21
|
+
this.id = 0;
|
|
22
|
+
this.data = "";
|
|
23
|
+
this.companyName = "";
|
|
24
|
+
this.recordDate = 0;
|
|
25
|
+
this.type = _enum_1.CorporateActionsType.BONUS;
|
|
26
|
+
this.status = _enum_1.CorporateActionsStatus.ACTIVE;
|
|
27
|
+
this.createdOn = 0;
|
|
28
|
+
this.updatedOn = 0;
|
|
29
|
+
this.createdBy = 0;
|
|
30
|
+
this.updatedBy = 0;
|
|
18
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Factory to convert from plain API entity
|
|
34
|
+
*/
|
|
35
|
+
static fromEntity(entity) {
|
|
36
|
+
const result = new CorporateActionsEntityModel();
|
|
37
|
+
Object.assign(result, entity);
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
getRelationConfigs() {
|
|
41
|
+
return this.constructor.prototype.constructor.relationConfigs;
|
|
42
|
+
}
|
|
43
|
+
// ---- Existing model conversion methods ----
|
|
19
44
|
getFPOModel() {
|
|
20
45
|
return new fpo_corporate_action_model_1.FPOCorporateActionModel(this);
|
|
21
46
|
}
|
|
@@ -50,4 +75,52 @@ class CorporateActionsModel {
|
|
|
50
75
|
return new ofs_corporate_action_model_1.OFSCorporateActionModel(this);
|
|
51
76
|
}
|
|
52
77
|
}
|
|
53
|
-
exports.
|
|
78
|
+
exports.CorporateActionsEntityModel = CorporateActionsEntityModel;
|
|
79
|
+
// export class CorporateActionsModel implements ICorporateActionsEntity {
|
|
80
|
+
// id: number;
|
|
81
|
+
// data: string;
|
|
82
|
+
// companyName: string;
|
|
83
|
+
// recordDate: number;
|
|
84
|
+
// type: CorporateActionsType;
|
|
85
|
+
// createdOn: Date;
|
|
86
|
+
// updatedOn: Date;
|
|
87
|
+
// createdBy: number;
|
|
88
|
+
// updatedBy: number;
|
|
89
|
+
// status: CorporateActionsStatus;
|
|
90
|
+
// constructor(data: ICorporateActionsEntity) {
|
|
91
|
+
// Object.assign(this, data);
|
|
92
|
+
// }
|
|
93
|
+
// getFPOModel() {
|
|
94
|
+
// return new FPOCorporateActionModel(this);
|
|
95
|
+
// }
|
|
96
|
+
// getDividendModel() {
|
|
97
|
+
// return new DividendCorporateActionModel(this);
|
|
98
|
+
// }
|
|
99
|
+
// getBuyBackModel() {
|
|
100
|
+
// return new BuyBackCorporateActionModel(this);
|
|
101
|
+
// }
|
|
102
|
+
// getOpenOfferModel() {
|
|
103
|
+
// return new OpenOfferCorporateActionModel(this);
|
|
104
|
+
// }
|
|
105
|
+
// getDelistingModel() {
|
|
106
|
+
// return new DelistingCorporateActionModel(this);
|
|
107
|
+
// }
|
|
108
|
+
// getRightIssuesModel() {
|
|
109
|
+
// return new RightIssueCorporateActionModel(this);
|
|
110
|
+
// }
|
|
111
|
+
// getSplitStockModel() {
|
|
112
|
+
// return new SplitCorporateActionModel(this);
|
|
113
|
+
// }
|
|
114
|
+
// getBonusModel() {
|
|
115
|
+
// return new BonusCorporateActionModel(this);
|
|
116
|
+
// }
|
|
117
|
+
// getIPOModel() {
|
|
118
|
+
// return new IPOCorporateActionModel(this);
|
|
119
|
+
// }
|
|
120
|
+
// getSplitAndBonusStockModel() {
|
|
121
|
+
// return new SplitBonusCorporateActionModel(this);
|
|
122
|
+
// }
|
|
123
|
+
// getOFSModel() {
|
|
124
|
+
// return new OFSCorporateActionModel(this);
|
|
125
|
+
// }
|
|
126
|
+
// }
|