plac-micro-common 1.2.45 → 1.2.47
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/application/app_coverage.entity.d.ts +3 -3
- package/dist/models/application/app_coverage.entity.js +32 -21
- package/dist/models/application/app_person.entity.js +12 -2
- package/dist/models/application/application.entity.js +12 -2
- package/dist/models/application/underwriting_question.entity.d.ts +2 -2
- package/dist/models/application/underwriting_question.entity.js +17 -12
- package/dist/models/customer/customer.entity.js +12 -2
- package/dist/models/customer/customer_address.entity.d.ts +2 -1
- package/dist/models/customer/customer_address.entity.js +7 -1
- package/dist/models/customer/customer_contact.entity.js +6 -1
- package/dist/models/customer/customer_corporate_profile.entity.d.ts +1 -1
- package/dist/models/customer/customer_identifier.entity.js +6 -1
- package/dist/models/customer/customer_individual_profile.entity.js +7 -1
- package/dist/utils/general.util.d.ts +1 -0
- package/dist/utils/general.util.js +12 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApplicationEntity } from
|
|
2
|
-
import { _BaseEntity } from
|
|
3
|
-
import { AppCoverageType, DiscountType } from
|
|
1
|
+
import { ApplicationEntity } from "./application.entity";
|
|
2
|
+
import { _BaseEntity } from "../_base_entity";
|
|
3
|
+
import { AppCoverageType, DiscountType } from "../../types";
|
|
4
4
|
export declare class AppCoverageEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
application_id: string;
|
|
@@ -14,88 +14,99 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const application_entity_1 = require("./application.entity");
|
|
15
15
|
const _base_entity_1 = require("../_base_entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
17
18
|
let AppCoverageEntity = class AppCoverageEntity extends _base_entity_1._BaseEntity {
|
|
18
19
|
};
|
|
19
20
|
exports.AppCoverageEntity = AppCoverageEntity;
|
|
20
21
|
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
23
|
__metadata("design:type", String)
|
|
23
24
|
], AppCoverageEntity.prototype, "id", void 0);
|
|
24
25
|
__decorate([
|
|
25
26
|
(0, typeorm_1.Index)(),
|
|
26
|
-
(0, typeorm_1.Column)({ type:
|
|
27
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], AppCoverageEntity.prototype, "application_id", void 0);
|
|
29
30
|
__decorate([
|
|
30
31
|
(0, typeorm_1.Index)(),
|
|
31
|
-
(0, typeorm_1.Column)({
|
|
32
|
+
(0, typeorm_1.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: 20,
|
|
35
|
+
default: types_1.AppCoverageType.Base,
|
|
36
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AppCoverageType),
|
|
37
|
+
}),
|
|
32
38
|
__metadata("design:type", String)
|
|
33
39
|
], AppCoverageEntity.prototype, "coverage_type", void 0);
|
|
34
40
|
__decorate([
|
|
35
41
|
(0, typeorm_1.Index)(),
|
|
36
|
-
(0, typeorm_1.Column)({ type:
|
|
42
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
37
43
|
__metadata("design:type", String)
|
|
38
44
|
], AppCoverageEntity.prototype, "product_id", void 0);
|
|
39
45
|
__decorate([
|
|
40
46
|
(0, typeorm_1.Index)(),
|
|
41
|
-
(0, typeorm_1.Column)({ type:
|
|
47
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
42
48
|
__metadata("design:type", Object)
|
|
43
49
|
], AppCoverageEntity.prototype, "product_plan_id", void 0);
|
|
44
50
|
__decorate([
|
|
45
51
|
(0, typeorm_1.Index)(),
|
|
46
|
-
(0, typeorm_1.Column)({ type:
|
|
52
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
47
53
|
__metadata("design:type", Object)
|
|
48
54
|
], AppCoverageEntity.prototype, "product_coverage_id", void 0);
|
|
49
55
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type:
|
|
56
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
51
57
|
__metadata("design:type", Number)
|
|
52
58
|
], AppCoverageEntity.prototype, "sequence_no", void 0);
|
|
53
59
|
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type:
|
|
60
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
|
|
55
61
|
__metadata("design:type", Object)
|
|
56
62
|
], AppCoverageEntity.prototype, "currency", void 0);
|
|
57
63
|
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type:
|
|
64
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
59
65
|
__metadata("design:type", Object)
|
|
60
66
|
], AppCoverageEntity.prototype, "sum_assured", void 0);
|
|
61
67
|
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "varchar",
|
|
70
|
+
length: 25,
|
|
71
|
+
nullable: true,
|
|
72
|
+
comment: (0, utils_1.enumToCommentString)(types_1.DiscountType),
|
|
73
|
+
}),
|
|
63
74
|
__metadata("design:type", Object)
|
|
64
75
|
], AppCoverageEntity.prototype, "discount_type", void 0);
|
|
65
76
|
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type:
|
|
77
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
67
78
|
__metadata("design:type", Object)
|
|
68
79
|
], AppCoverageEntity.prototype, "discount_value", void 0);
|
|
69
80
|
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ type:
|
|
81
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
71
82
|
__metadata("design:type", Object)
|
|
72
83
|
], AppCoverageEntity.prototype, "discount_premium_amount", void 0);
|
|
73
84
|
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({ type:
|
|
85
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
75
86
|
__metadata("design:type", Object)
|
|
76
87
|
], AppCoverageEntity.prototype, "annual_premium_amount", void 0);
|
|
77
88
|
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({ type:
|
|
89
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
79
90
|
__metadata("design:type", Object)
|
|
80
91
|
], AppCoverageEntity.prototype, "mode_premium_amount", void 0);
|
|
81
92
|
__decorate([
|
|
82
|
-
(0, typeorm_1.Column)({ type:
|
|
93
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
83
94
|
__metadata("design:type", Object)
|
|
84
95
|
], AppCoverageEntity.prototype, "product_payment_mode_id", void 0);
|
|
85
96
|
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({ type:
|
|
97
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
87
98
|
__metadata("design:type", Object)
|
|
88
99
|
], AppCoverageEntity.prototype, "product_policy_term_id", void 0);
|
|
89
100
|
__decorate([
|
|
90
|
-
(0, typeorm_1.Column)({ type:
|
|
101
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
91
102
|
__metadata("design:type", Boolean)
|
|
92
103
|
], AppCoverageEntity.prototype, "is_active", void 0);
|
|
93
104
|
__decorate([
|
|
94
|
-
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete:
|
|
95
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
105
|
+
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete: "CASCADE" }),
|
|
106
|
+
(0, typeorm_1.JoinColumn)({ name: "application_id" }),
|
|
96
107
|
__metadata("design:type", application_entity_1.ApplicationEntity)
|
|
97
108
|
], AppCoverageEntity.prototype, "application", void 0);
|
|
98
109
|
exports.AppCoverageEntity = AppCoverageEntity = __decorate([
|
|
99
|
-
(0, typeorm_1.Entity)({ schema:
|
|
100
|
-
(0, typeorm_1.Unique)(
|
|
110
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "app_coverages" }),
|
|
111
|
+
(0, typeorm_1.Unique)("uq_app_coverage_app_seq", ["application_id", "sequence_no"])
|
|
101
112
|
], AppCoverageEntity);
|
|
@@ -15,6 +15,7 @@ const application_entity_1 = require("./application.entity");
|
|
|
15
15
|
const _base_entity_1 = require("../_base_entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
17
|
const customer_1 = require("../customer");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
18
19
|
let AppPersonEntity = class AppPersonEntity extends _base_entity_1._BaseEntity {
|
|
19
20
|
};
|
|
20
21
|
exports.AppPersonEntity = AppPersonEntity;
|
|
@@ -29,7 +30,11 @@ __decorate([
|
|
|
29
30
|
], AppPersonEntity.prototype, "application_id", void 0);
|
|
30
31
|
__decorate([
|
|
31
32
|
(0, typeorm_1.Index)(),
|
|
32
|
-
(0, typeorm_1.Column)({
|
|
33
|
+
(0, typeorm_1.Column)({
|
|
34
|
+
type: "varchar",
|
|
35
|
+
length: 30,
|
|
36
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AppPersonRole),
|
|
37
|
+
}),
|
|
33
38
|
__metadata("design:type", String)
|
|
34
39
|
], AppPersonEntity.prototype, "role", void 0);
|
|
35
40
|
__decorate([
|
|
@@ -80,7 +85,12 @@ __decorate([
|
|
|
80
85
|
], AppPersonEntity.prototype, "nationality_id", void 0);
|
|
81
86
|
__decorate([
|
|
82
87
|
(0, typeorm_1.Index)(),
|
|
83
|
-
(0, typeorm_1.Column)({
|
|
88
|
+
(0, typeorm_1.Column)({
|
|
89
|
+
type: "varchar",
|
|
90
|
+
length: 50,
|
|
91
|
+
nullable: true,
|
|
92
|
+
comment: (0, utils_1.enumToCommentString)(types_1.IdentifierType),
|
|
93
|
+
}),
|
|
84
94
|
__metadata("design:type", Object)
|
|
85
95
|
], AppPersonEntity.prototype, "identifier_type", void 0);
|
|
86
96
|
__decorate([
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const types_1 = require("../../types");
|
|
16
16
|
const core_1 = require("../core");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
17
18
|
let ApplicationEntity = class ApplicationEntity extends _base_entity_1._BaseEntity {
|
|
18
19
|
};
|
|
19
20
|
exports.ApplicationEntity = ApplicationEntity;
|
|
@@ -27,7 +28,12 @@ __decorate([
|
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], ApplicationEntity.prototype, "application_no", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: 50,
|
|
34
|
+
default: types_1.AppPhLaRelation.SamePerson,
|
|
35
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AppPhLaRelation),
|
|
36
|
+
}),
|
|
31
37
|
__metadata("design:type", String)
|
|
32
38
|
], ApplicationEntity.prototype, "ph_la_relation", void 0);
|
|
33
39
|
__decorate([
|
|
@@ -66,7 +72,11 @@ __decorate([
|
|
|
66
72
|
], ApplicationEntity.prototype, "assigned_org_staff_id", void 0);
|
|
67
73
|
__decorate([
|
|
68
74
|
(0, typeorm_1.Index)(),
|
|
69
|
-
(0, typeorm_1.Column)({
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "varchar",
|
|
77
|
+
length: 30,
|
|
78
|
+
comment: (0, utils_1.enumToCommentString)(types_1.ApplicationStatus),
|
|
79
|
+
}),
|
|
70
80
|
__metadata("design:type", String)
|
|
71
81
|
], ApplicationEntity.prototype, "status", void 0);
|
|
72
82
|
__decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _BaseEntity } from
|
|
2
|
-
import { UwAnswerValueType } from
|
|
1
|
+
import { _BaseEntity } from "../_base_entity";
|
|
2
|
+
import { UwAnswerValueType } from "../../types";
|
|
3
3
|
export declare class UnderwritingQuestionEntity extends _BaseEntity {
|
|
4
4
|
id: string;
|
|
5
5
|
question_code: string;
|
|
@@ -13,54 +13,59 @@ exports.UnderwritingQuestionEntity = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const types_1 = require("../../types");
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
16
17
|
let UnderwritingQuestionEntity = class UnderwritingQuestionEntity extends _base_entity_1._BaseEntity {
|
|
17
18
|
};
|
|
18
19
|
exports.UnderwritingQuestionEntity = UnderwritingQuestionEntity;
|
|
19
20
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
22
|
__metadata("design:type", String)
|
|
22
23
|
], UnderwritingQuestionEntity.prototype, "id", void 0);
|
|
23
24
|
__decorate([
|
|
24
25
|
(0, typeorm_1.Index)(),
|
|
25
|
-
(0, typeorm_1.Column)({ type:
|
|
26
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, unique: true }),
|
|
26
27
|
__metadata("design:type", String)
|
|
27
28
|
], UnderwritingQuestionEntity.prototype, "question_code", void 0);
|
|
28
29
|
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({ type:
|
|
30
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500 }),
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], UnderwritingQuestionEntity.prototype, "question_text", void 0);
|
|
32
33
|
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type:
|
|
34
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true, length: 500 }),
|
|
34
35
|
__metadata("design:type", String)
|
|
35
36
|
], UnderwritingQuestionEntity.prototype, "question_text_kh", void 0);
|
|
36
37
|
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
type: "varchar",
|
|
40
|
+
length: 20,
|
|
41
|
+
comment: (0, utils_1.enumToCommentString)(types_1.UwAnswerValueType),
|
|
42
|
+
}),
|
|
38
43
|
__metadata("design:type", String)
|
|
39
44
|
], UnderwritingQuestionEntity.prototype, "value_type", void 0);
|
|
40
45
|
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type:
|
|
46
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
42
47
|
__metadata("design:type", Boolean)
|
|
43
48
|
], UnderwritingQuestionEntity.prototype, "is_required", void 0);
|
|
44
49
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type:
|
|
50
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
46
51
|
__metadata("design:type", Boolean)
|
|
47
52
|
], UnderwritingQuestionEntity.prototype, "is_remark_required_if_true_or_yes", void 0);
|
|
48
53
|
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type:
|
|
54
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true, length: 500 }),
|
|
50
55
|
__metadata("design:type", String)
|
|
51
56
|
], UnderwritingQuestionEntity.prototype, "remark_label", void 0);
|
|
52
57
|
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type:
|
|
58
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true, length: 500 }),
|
|
54
59
|
__metadata("design:type", String)
|
|
55
60
|
], UnderwritingQuestionEntity.prototype, "remark_label_kh", void 0);
|
|
56
61
|
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type:
|
|
62
|
+
(0, typeorm_1.Column)({ type: "integer", default: 1 }),
|
|
58
63
|
__metadata("design:type", Number)
|
|
59
64
|
], UnderwritingQuestionEntity.prototype, "sequence_no", void 0);
|
|
60
65
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type:
|
|
66
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
62
67
|
__metadata("design:type", Boolean)
|
|
63
68
|
], UnderwritingQuestionEntity.prototype, "is_active", void 0);
|
|
64
69
|
exports.UnderwritingQuestionEntity = UnderwritingQuestionEntity = __decorate([
|
|
65
|
-
(0, typeorm_1.Entity)({ schema:
|
|
70
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "underwriting_questions" })
|
|
66
71
|
], UnderwritingQuestionEntity);
|
|
@@ -19,6 +19,7 @@ const customer_contact_entity_1 = require("./customer_contact.entity");
|
|
|
19
19
|
const customer_address_entity_1 = require("./customer_address.entity");
|
|
20
20
|
const customer_identifier_entity_1 = require("./customer_identifier.entity");
|
|
21
21
|
const core_1 = require("../core");
|
|
22
|
+
const utils_1 = require("../../utils");
|
|
22
23
|
let CustomerEntity = class CustomerEntity extends _base_entity_1._BaseEntity {
|
|
23
24
|
};
|
|
24
25
|
exports.CustomerEntity = CustomerEntity;
|
|
@@ -43,12 +44,21 @@ __decorate([
|
|
|
43
44
|
__metadata("design:type", Object)
|
|
44
45
|
], CustomerEntity.prototype, "full_name_kh", void 0);
|
|
45
46
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
+
(0, typeorm_1.Column)({
|
|
48
|
+
type: "varchar",
|
|
49
|
+
length: 20,
|
|
50
|
+
comment: (0, utils_1.enumToCommentString)(types_1.CustomerType),
|
|
51
|
+
}),
|
|
47
52
|
(0, typeorm_1.Index)(),
|
|
48
53
|
__metadata("design:type", String)
|
|
49
54
|
], CustomerEntity.prototype, "type", void 0);
|
|
50
55
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
type: "varchar",
|
|
58
|
+
length: 20,
|
|
59
|
+
default: types_1.CustomerStatus.Active,
|
|
60
|
+
comment: (0, utils_1.enumToCommentString)(types_1.CustomerStatus),
|
|
61
|
+
}),
|
|
52
62
|
(0, typeorm_1.Index)(),
|
|
53
63
|
__metadata("design:type", String)
|
|
54
64
|
], CustomerEntity.prototype, "status", void 0);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
2
|
import { CustomerEntity } from "./customer.entity";
|
|
3
3
|
import { GeoCommuneEntity, GeoDistrictEntity, GeoProvinceEntity, GeoVillageEntity } from "../core";
|
|
4
|
+
import { AddressType } from "../../types";
|
|
4
5
|
export declare class CustomerAddressEntity extends _BaseEntity {
|
|
5
6
|
id: string;
|
|
6
7
|
customer_id: string;
|
|
7
|
-
address_type:
|
|
8
|
+
address_type: AddressType;
|
|
8
9
|
label?: string | null;
|
|
9
10
|
full_address: string;
|
|
10
11
|
full_address_kh?: string;
|
|
@@ -14,6 +14,8 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const customer_entity_1 = require("./customer.entity");
|
|
16
16
|
const core_1 = require("../core");
|
|
17
|
+
const types_1 = require("../../types");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
17
19
|
let CustomerAddressEntity = class CustomerAddressEntity extends _base_entity_1._BaseEntity {
|
|
18
20
|
};
|
|
19
21
|
exports.CustomerAddressEntity = CustomerAddressEntity;
|
|
@@ -27,7 +29,11 @@ __decorate([
|
|
|
27
29
|
__metadata("design:type", String)
|
|
28
30
|
], CustomerAddressEntity.prototype, "customer_id", void 0);
|
|
29
31
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
32
|
+
(0, typeorm_1.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: 30,
|
|
35
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AddressType),
|
|
36
|
+
}),
|
|
31
37
|
__metadata("design:type", String)
|
|
32
38
|
], CustomerAddressEntity.prototype, "address_type", void 0);
|
|
33
39
|
__decorate([
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const customer_entity_1 = require("./customer.entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
17
18
|
let CustomerContactEntity = class CustomerContactEntity extends _base_entity_1._BaseEntity {
|
|
18
19
|
};
|
|
19
20
|
exports.CustomerContactEntity = CustomerContactEntity;
|
|
@@ -27,7 +28,11 @@ __decorate([
|
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], CustomerContactEntity.prototype, "customer_id", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: 20,
|
|
34
|
+
comment: (0, utils_1.enumToCommentString)(types_1.ContactType),
|
|
35
|
+
}),
|
|
31
36
|
__metadata("design:type", String)
|
|
32
37
|
], CustomerContactEntity.prototype, "contact_type", void 0);
|
|
33
38
|
__decorate([
|
|
@@ -8,6 +8,6 @@ export declare class CustomerCorporateProfileEntity extends _BaseEntity {
|
|
|
8
8
|
company_registration_no?: string | null;
|
|
9
9
|
tax_id?: string | null;
|
|
10
10
|
industry?: string | null;
|
|
11
|
-
incorporation_date?:
|
|
11
|
+
incorporation_date?: string | null;
|
|
12
12
|
customer: CustomerEntity;
|
|
13
13
|
}
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const customer_entity_1 = require("./customer.entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
17
18
|
let CustomerIdentifierEntity = class CustomerIdentifierEntity extends _base_entity_1._BaseEntity {
|
|
18
19
|
};
|
|
19
20
|
exports.CustomerIdentifierEntity = CustomerIdentifierEntity;
|
|
@@ -27,7 +28,11 @@ __decorate([
|
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], CustomerIdentifierEntity.prototype, "customer_id", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: 30,
|
|
34
|
+
comment: (0, utils_1.enumToCommentString)(types_1.IdentifierType),
|
|
35
|
+
}),
|
|
31
36
|
__metadata("design:type", String)
|
|
32
37
|
], CustomerIdentifierEntity.prototype, "identifier_type", void 0);
|
|
33
38
|
__decorate([
|
|
@@ -15,6 +15,7 @@ const _base_entity_1 = require("../_base_entity");
|
|
|
15
15
|
const customer_entity_1 = require("./customer.entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
17
|
const core_1 = require("../core");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
18
19
|
let CustomerIndividualProfileEntity = class CustomerIndividualProfileEntity extends _base_entity_1._BaseEntity {
|
|
19
20
|
};
|
|
20
21
|
exports.CustomerIndividualProfileEntity = CustomerIndividualProfileEntity;
|
|
@@ -48,7 +49,12 @@ __decorate([
|
|
|
48
49
|
__metadata("design:type", Object)
|
|
49
50
|
], CustomerIndividualProfileEntity.prototype, "date_of_birth", void 0);
|
|
50
51
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
+
(0, typeorm_1.Column)({
|
|
53
|
+
type: "varchar",
|
|
54
|
+
length: 5,
|
|
55
|
+
nullable: true,
|
|
56
|
+
comment: (0, utils_1.enumToCommentString)(types_1.Gender),
|
|
57
|
+
}),
|
|
52
58
|
__metadata("design:type", String)
|
|
53
59
|
], CustomerIndividualProfileEntity.prototype, "gender", void 0);
|
|
54
60
|
__decorate([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function enumToCommentString(enumObj: Record<string, string | number>): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enumToCommentString = enumToCommentString;
|
|
4
|
+
function enumToCommentString(enumObj) {
|
|
5
|
+
const entries = [];
|
|
6
|
+
for (const [key, value] of Object.entries(enumObj)) {
|
|
7
|
+
if (typeof value === "number") {
|
|
8
|
+
entries.push(`${value}=${key}`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return entries.join(", ");
|
|
12
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./frontend"), exports);
|
|
18
|
+
__exportStar(require("./general.util"), exports);
|
|
18
19
|
__exportStar(require("./http.util"), exports);
|
|
19
20
|
__exportStar(require("./query.util"), exports);
|
|
20
21
|
__exportStar(require("./pagination.util"), exports);
|