plac-micro-common 1.2.46 → 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.
@@ -1,6 +1,6 @@
1
- import { ApplicationEntity } from './application.entity';
2
- import { _BaseEntity } from '../_base_entity';
3
- import { AppCoverageType, DiscountType } from '../../types';
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)('uuid'),
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: 'uuid' }),
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)({ type: 'varchar', length: 20, default: types_1.AppCoverageType.Base }),
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: 'uuid' }),
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: 'uuid', nullable: true }),
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: 'uuid', nullable: true }),
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: 'int' }),
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: 'varchar', length: 10, nullable: true }),
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: 'numeric', nullable: true }),
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)({ type: 'varchar', length: 25, nullable: true }),
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: 'numeric', nullable: true }),
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: 'numeric', nullable: true }),
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: 'numeric', nullable: true }),
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: 'numeric', nullable: true }),
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: 'uuid', nullable: true }),
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: 'uuid', nullable: true }),
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: 'boolean', default: true }),
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: 'CASCADE' }),
95
- (0, typeorm_1.JoinColumn)({ name: 'application_id' }),
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: 'application', name: 'app_coverages' }),
100
- (0, typeorm_1.Unique)('uq_app_coverage_app_seq', ['application_id', 'sequence_no'])
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)({ type: "varchar", length: 30 }),
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)({ type: "varchar", length: 50, nullable: true }),
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)({ type: "varchar", length: 50, default: types_1.AppPhLaRelation.SamePerson }),
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)({ type: "varchar", length: 30 }),
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 '../_base_entity';
2
- import { UwAnswerValueType } from '../../types';
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)('uuid'),
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: 'varchar', length: 50, unique: true }),
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: 'varchar', length: 500 }),
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: 'varchar', nullable: true, length: 500 }),
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)({ type: 'varchar', length: 20 }),
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: 'boolean', default: true }),
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: 'boolean', default: false }),
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: 'varchar', nullable: true, length: 500 }),
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: 'varchar', nullable: true, length: 500 }),
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: 'integer', default: 1 }),
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: 'boolean', default: true }),
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: 'application', name: 'underwriting_questions' })
70
+ (0, typeorm_1.Entity)({ schema: "application", name: "underwriting_questions" })
66
71
  ], UnderwritingQuestionEntity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.2.46",
3
+ "version": "1.2.47",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {