plac-micro-common 1.3.76 → 1.3.77
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/dist/models/core/index.d.ts +1 -1
- package/dist/models/core/product/death_benefit.entity.d.ts +9 -0
- package/dist/models/core/product/death_benefit.entity.js +45 -0
- package/dist/models/core/product/index.d.ts +4 -2
- package/dist/models/core/product/index.js +7 -1
- package/dist/models/core/product/product.entity.d.ts +4 -0
- package/dist/models/core/product/product.entity.js +10 -0
- package/dist/models/core/product/surrender_value.entity.d.ts +9 -0
- package/dist/models/core/product/surrender_value.entity.js +45 -0
- package/dist/types/underwriting.type.d.ts +1 -0
- package/dist/types/underwriting.type.js +1 -0
- package/package.json +1 -1
- package/dist/database/data-source.d.ts +0 -2
- package/dist/database/data-source.js +0 -59
- package/dist/database/migrations/1775805048337-AddProductColumn.d.ts +0 -6
- package/dist/database/migrations/1775805048337-AddProductColumn.js +0 -15
|
@@ -18,7 +18,7 @@ import { RelationshipEntity } from "./relationship.entity";
|
|
|
18
18
|
import { StaffEntity } from "./staffs.entity";
|
|
19
19
|
import { PaymentMethodEntity } from "./payment_method.entity";
|
|
20
20
|
import { OrgReferralEntity } from "./org_referral.entity";
|
|
21
|
-
export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof OrgReferralEntity, typeof OccupationEntity, typeof PaymentMethodEntity, typeof RelationshipEntity, typeof StaffEntity, typeof import("./product").CashValueEntity, typeof import("./product").PaymentModeEntity, typeof import("./product").PremiumRateConditionEntity, typeof import("./product").PremiumRateValueEntity, typeof import("./product").ProductEntity, typeof import("./product").ProductOrgEntity, typeof import("./product").ProductTypeEntity, typeof import("./product").ProductPaymentModeEntity, typeof import("./product").ProductRiderEntity, typeof import("./product").ProductTermEntity, typeof import("./product").ProductPlanEntity, typeof import("./product").PromotionEntity, typeof import("./product").PromotionOrgEntity, typeof import("./product").PromotionProductEntity, typeof import("./product").RiderEntity, typeof import("./product").TermEntity, typeof import("./finance").ExchangeRateEntity, typeof import("./finance").ExchangeRateLogEntity, typeof import("./finance").ExchangeRateSyncLogEntity];
|
|
21
|
+
export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof OrgReferralEntity, typeof OccupationEntity, typeof PaymentMethodEntity, typeof RelationshipEntity, typeof StaffEntity, typeof import("./product").CashValueEntity, typeof import("./product").DeathBenefitEntity, typeof import("./product").PaymentModeEntity, typeof import("./product").PremiumRateConditionEntity, typeof import("./product").PremiumRateValueEntity, typeof import("./product").ProductEntity, typeof import("./product").ProductOrgEntity, typeof import("./product").ProductTypeEntity, typeof import("./product").ProductPaymentModeEntity, typeof import("./product").ProductRiderEntity, typeof import("./product").ProductTermEntity, typeof import("./product").ProductPlanEntity, typeof import("./product").PromotionEntity, typeof import("./product").PromotionOrgEntity, typeof import("./product").PromotionProductEntity, typeof import("./product").RiderEntity, typeof import("./product").SurrenderValueEntity, typeof import("./product").TermEntity, typeof import("./finance").ExchangeRateEntity, typeof import("./finance").ExchangeRateLogEntity, typeof import("./finance").ExchangeRateSyncLogEntity];
|
|
22
22
|
export { GeoProvinceEntity, GeoDistrictEntity, GeoCommuneEntity, GeoVillageEntity, MaritalStatusEntity, NationalityEntity, NumberSeriesEntity, OrganizationEntity, OrganizationBranchEntity, OrganizationChannelEntity, OrganizationDepartmentEntity, OrganizationPositionEntity, OrganizationStaffEntity, OrganizationStaffBranchEntity, OrganizationStaffReportingLineEntity, OrgReferralEntity, OccupationEntity, PaymentMethodEntity, RelationshipEntity, StaffEntity, };
|
|
23
23
|
export * from "./product";
|
|
24
24
|
export * from "./finance";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeathBenefitEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const product_entity_1 = require("./product.entity");
|
|
15
|
+
let DeathBenefitEntity = class DeathBenefitEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.DeathBenefitEntity = DeathBenefitEntity;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], DeathBenefitEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], DeathBenefitEntity.prototype, "product_id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], DeathBenefitEntity.prototype, "year", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], DeathBenefitEntity.prototype, "plan", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 18, scale: 2 }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], DeathBenefitEntity.prototype, "value", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
41
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
42
|
+
], DeathBenefitEntity.prototype, "product", void 0);
|
|
43
|
+
exports.DeathBenefitEntity = DeathBenefitEntity = __decorate([
|
|
44
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "death_benefits" })
|
|
45
|
+
], DeathBenefitEntity);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CashValueEntity } from "./cash_value.entity";
|
|
2
|
+
import { DeathBenefitEntity } from "./death_benefit.entity";
|
|
2
3
|
import { PaymentModeEntity } from "./payment_mode.entity";
|
|
3
4
|
import { PremiumRateConditionEntity } from "./premium_rate_condition.entity";
|
|
4
5
|
import { PremiumRateValueEntity } from "./premium_rate_value.entity";
|
|
@@ -13,6 +14,7 @@ import { PromotionEntity } from "./promotion.entity";
|
|
|
13
14
|
import { PromotionOrgEntity } from "./promotion_org.entity";
|
|
14
15
|
import { PromotionProductEntity } from "./promotion_product.entity";
|
|
15
16
|
import { RiderEntity } from "./rider.entity";
|
|
17
|
+
import { SurrenderValueEntity } from "./surrender_value.entity";
|
|
16
18
|
import { TermEntity } from "./term.entity";
|
|
17
|
-
export declare const PRODUCT_ENTITIES: readonly [typeof CashValueEntity, typeof PaymentModeEntity, typeof PremiumRateConditionEntity, typeof PremiumRateValueEntity, typeof ProductEntity, typeof ProductOrgEntity, typeof ProductTypeEntity, typeof ProductPaymentModeEntity, typeof ProductRiderEntity, typeof ProductTermEntity, typeof ProductPlanEntity, typeof PromotionEntity, typeof PromotionOrgEntity, typeof PromotionProductEntity, typeof RiderEntity, typeof TermEntity];
|
|
18
|
-
export { CashValueEntity, PaymentModeEntity, PremiumRateConditionEntity, PremiumRateValueEntity, ProductEntity, ProductOrgEntity, ProductTypeEntity, ProductPaymentModeEntity, ProductRiderEntity, ProductTermEntity, ProductPlanEntity, PromotionEntity, PromotionOrgEntity, PromotionProductEntity, RiderEntity, TermEntity, };
|
|
19
|
+
export declare const PRODUCT_ENTITIES: readonly [typeof CashValueEntity, typeof DeathBenefitEntity, typeof PaymentModeEntity, typeof PremiumRateConditionEntity, typeof PremiumRateValueEntity, typeof ProductEntity, typeof ProductOrgEntity, typeof ProductTypeEntity, typeof ProductPaymentModeEntity, typeof ProductRiderEntity, typeof ProductTermEntity, typeof ProductPlanEntity, typeof PromotionEntity, typeof PromotionOrgEntity, typeof PromotionProductEntity, typeof RiderEntity, typeof SurrenderValueEntity, typeof TermEntity];
|
|
20
|
+
export { CashValueEntity, DeathBenefitEntity, PaymentModeEntity, PremiumRateConditionEntity, PremiumRateValueEntity, ProductEntity, ProductOrgEntity, ProductTypeEntity, ProductPaymentModeEntity, ProductRiderEntity, ProductTermEntity, ProductPlanEntity, PromotionEntity, PromotionOrgEntity, PromotionProductEntity, RiderEntity, SurrenderValueEntity, TermEntity, };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TermEntity = exports.RiderEntity = exports.PromotionProductEntity = exports.PromotionOrgEntity = exports.PromotionEntity = exports.ProductPlanEntity = exports.ProductTermEntity = exports.ProductRiderEntity = exports.ProductPaymentModeEntity = exports.ProductTypeEntity = exports.ProductOrgEntity = exports.ProductEntity = exports.PremiumRateValueEntity = exports.PremiumRateConditionEntity = exports.PaymentModeEntity = exports.CashValueEntity = exports.PRODUCT_ENTITIES = void 0;
|
|
3
|
+
exports.TermEntity = exports.SurrenderValueEntity = exports.RiderEntity = exports.PromotionProductEntity = exports.PromotionOrgEntity = exports.PromotionEntity = exports.ProductPlanEntity = exports.ProductTermEntity = exports.ProductRiderEntity = exports.ProductPaymentModeEntity = exports.ProductTypeEntity = exports.ProductOrgEntity = exports.ProductEntity = exports.PremiumRateValueEntity = exports.PremiumRateConditionEntity = exports.PaymentModeEntity = exports.DeathBenefitEntity = exports.CashValueEntity = exports.PRODUCT_ENTITIES = void 0;
|
|
4
4
|
const cash_value_entity_1 = require("./cash_value.entity");
|
|
5
5
|
Object.defineProperty(exports, "CashValueEntity", { enumerable: true, get: function () { return cash_value_entity_1.CashValueEntity; } });
|
|
6
|
+
const death_benefit_entity_1 = require("./death_benefit.entity");
|
|
7
|
+
Object.defineProperty(exports, "DeathBenefitEntity", { enumerable: true, get: function () { return death_benefit_entity_1.DeathBenefitEntity; } });
|
|
6
8
|
const payment_mode_entity_1 = require("./payment_mode.entity");
|
|
7
9
|
Object.defineProperty(exports, "PaymentModeEntity", { enumerable: true, get: function () { return payment_mode_entity_1.PaymentModeEntity; } });
|
|
8
10
|
const premium_rate_condition_entity_1 = require("./premium_rate_condition.entity");
|
|
@@ -31,10 +33,13 @@ const promotion_product_entity_1 = require("./promotion_product.entity");
|
|
|
31
33
|
Object.defineProperty(exports, "PromotionProductEntity", { enumerable: true, get: function () { return promotion_product_entity_1.PromotionProductEntity; } });
|
|
32
34
|
const rider_entity_1 = require("./rider.entity");
|
|
33
35
|
Object.defineProperty(exports, "RiderEntity", { enumerable: true, get: function () { return rider_entity_1.RiderEntity; } });
|
|
36
|
+
const surrender_value_entity_1 = require("./surrender_value.entity");
|
|
37
|
+
Object.defineProperty(exports, "SurrenderValueEntity", { enumerable: true, get: function () { return surrender_value_entity_1.SurrenderValueEntity; } });
|
|
34
38
|
const term_entity_1 = require("./term.entity");
|
|
35
39
|
Object.defineProperty(exports, "TermEntity", { enumerable: true, get: function () { return term_entity_1.TermEntity; } });
|
|
36
40
|
exports.PRODUCT_ENTITIES = [
|
|
37
41
|
cash_value_entity_1.CashValueEntity,
|
|
42
|
+
death_benefit_entity_1.DeathBenefitEntity,
|
|
38
43
|
payment_mode_entity_1.PaymentModeEntity,
|
|
39
44
|
premium_rate_condition_entity_1.PremiumRateConditionEntity,
|
|
40
45
|
premium_rate_value_entity_1.PremiumRateValueEntity,
|
|
@@ -49,5 +54,6 @@ exports.PRODUCT_ENTITIES = [
|
|
|
49
54
|
promotion_org_entity_1.PromotionOrgEntity,
|
|
50
55
|
promotion_product_entity_1.PromotionProductEntity,
|
|
51
56
|
rider_entity_1.RiderEntity,
|
|
57
|
+
surrender_value_entity_1.SurrenderValueEntity,
|
|
52
58
|
term_entity_1.TermEntity,
|
|
53
59
|
];
|
|
@@ -5,6 +5,8 @@ import { ProductTermEntity } from "./product_term.entity";
|
|
|
5
5
|
import { ProductPaymentModeEntity } from "./product_payment_mode.entity";
|
|
6
6
|
import { ProductRiderEntity } from "./product_rider.entity";
|
|
7
7
|
import { ProductOrgEntity } from "./product_org.entity";
|
|
8
|
+
import { DeathBenefitEntity } from "./death_benefit.entity";
|
|
9
|
+
import { SurrenderValueEntity } from "./surrender_value.entity";
|
|
8
10
|
export declare class ProductEntity extends _BaseEntity {
|
|
9
11
|
id: string;
|
|
10
12
|
product_type_id: string;
|
|
@@ -19,4 +21,6 @@ export declare class ProductEntity extends _BaseEntity {
|
|
|
19
21
|
product_payment_modes?: ProductPaymentModeEntity[];
|
|
20
22
|
product_riders?: ProductRiderEntity[];
|
|
21
23
|
product_org?: ProductOrgEntity[];
|
|
24
|
+
death_benefits?: DeathBenefitEntity[];
|
|
25
|
+
surrender_values?: SurrenderValueEntity[];
|
|
22
26
|
}
|
|
@@ -19,6 +19,8 @@ const product_term_entity_1 = require("./product_term.entity");
|
|
|
19
19
|
const product_payment_mode_entity_1 = require("./product_payment_mode.entity");
|
|
20
20
|
const product_rider_entity_1 = require("./product_rider.entity");
|
|
21
21
|
const product_org_entity_1 = require("./product_org.entity");
|
|
22
|
+
const death_benefit_entity_1 = require("./death_benefit.entity");
|
|
23
|
+
const surrender_value_entity_1 = require("./surrender_value.entity");
|
|
22
24
|
let ProductEntity = class ProductEntity extends _base_entity_1._BaseEntity {
|
|
23
25
|
};
|
|
24
26
|
exports.ProductEntity = ProductEntity;
|
|
@@ -85,6 +87,14 @@ __decorate([
|
|
|
85
87
|
(0, typeorm_1.OneToMany)(() => product_org_entity_1.ProductOrgEntity, (x) => x.product),
|
|
86
88
|
__metadata("design:type", Array)
|
|
87
89
|
], ProductEntity.prototype, "product_org", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.OneToMany)(() => death_benefit_entity_1.DeathBenefitEntity, (x) => x.product),
|
|
92
|
+
__metadata("design:type", Array)
|
|
93
|
+
], ProductEntity.prototype, "death_benefits", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.OneToMany)(() => surrender_value_entity_1.SurrenderValueEntity, (x) => x.product),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], ProductEntity.prototype, "surrender_values", void 0);
|
|
88
98
|
exports.ProductEntity = ProductEntity = __decorate([
|
|
89
99
|
(0, typeorm_1.Entity)({ schema: "core", name: "products" }),
|
|
90
100
|
(0, typeorm_1.Index)("ux_products_product_code", ["product_code"], { unique: true })
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SurrenderValueEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const product_entity_1 = require("./product.entity");
|
|
15
|
+
let SurrenderValueEntity = class SurrenderValueEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.SurrenderValueEntity = SurrenderValueEntity;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], SurrenderValueEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], SurrenderValueEntity.prototype, "product_id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], SurrenderValueEntity.prototype, "year", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], SurrenderValueEntity.prototype, "plan", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 18, scale: 2 }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], SurrenderValueEntity.prototype, "value", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
41
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
42
|
+
], SurrenderValueEntity.prototype, "product", void 0);
|
|
43
|
+
exports.SurrenderValueEntity = SurrenderValueEntity = __decorate([
|
|
44
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "surrender_values" })
|
|
45
|
+
], SurrenderValueEntity);
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UnderwritingBaseQuestionCode = exports.UnderwritingQuestionGroupCode = exports.UnderwritingSIOQuestionCode = void 0;
|
|
4
4
|
var UnderwritingSIOQuestionCode;
|
|
5
5
|
(function (UnderwritingSIOQuestionCode) {
|
|
6
|
+
UnderwritingSIOQuestionCode["Q_USA"] = "Q-SIO-USA";
|
|
6
7
|
UnderwritingSIOQuestionCode["Q_Smoke"] = "Q-SIO-SMOKE";
|
|
7
8
|
UnderwritingSIOQuestionCode["Q_Drink"] = "Q-SIO-DRINK";
|
|
8
9
|
UnderwritingSIOQuestionCode["Q_Hospitalized"] = "Q-SIO-HOSPITALIZED";
|
package/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.AppDataSource = void 0;
|
|
37
|
-
const dotenv = __importStar(require("dotenv"));
|
|
38
|
-
const typeorm_1 = require("typeorm");
|
|
39
|
-
dotenv.config({ path: process.env.DOTENV_CONFIG_PATH || ".env" });
|
|
40
|
-
const core_1 = require("../models/core");
|
|
41
|
-
const quotation_1 = require("../models/quotation");
|
|
42
|
-
const application_1 = require("../models/application");
|
|
43
|
-
const customer_1 = require("../models/customer");
|
|
44
|
-
exports.AppDataSource = new typeorm_1.DataSource({
|
|
45
|
-
type: "postgres",
|
|
46
|
-
host: process.env.DB_HOST || "localhost",
|
|
47
|
-
port: Number(process.env.DB_PORT) || 5432,
|
|
48
|
-
username: process.env.DB_USERNAME,
|
|
49
|
-
password: process.env.DB_PASSWORD,
|
|
50
|
-
database: process.env.DB_NAME,
|
|
51
|
-
entities: [
|
|
52
|
-
...core_1.CORE_ENTITIES,
|
|
53
|
-
...quotation_1.QUOTATION_ENTITIES,
|
|
54
|
-
...application_1.APPLICATION_ENTITIES,
|
|
55
|
-
...customer_1.CUSTOMER_ENTITIES,
|
|
56
|
-
],
|
|
57
|
-
migrations: ["src/database/migrations/*.ts"],
|
|
58
|
-
migrationsTableName: "typeorm_migrations",
|
|
59
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AddProductColumn1775805048337 = void 0;
|
|
4
|
-
class AddProductColumn1775805048337 {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = 'AddProductColumn1775805048337';
|
|
7
|
-
}
|
|
8
|
-
async up(queryRunner) {
|
|
9
|
-
await queryRunner.query(`ALTER TABLE "core"."products" ADD "description" character varying(255)`);
|
|
10
|
-
}
|
|
11
|
-
async down(queryRunner) {
|
|
12
|
-
await queryRunner.query(`ALTER TABLE "core"."products" DROP COLUMN "description"`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.AddProductColumn1775805048337 = AddProductColumn1775805048337;
|