plac-micro-common 1.2.39 → 1.2.41
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_person.entity.d.ts +4 -4
- package/dist/models/application/app_person.entity.js +48 -48
- package/dist/models/application/app_underwriting_answer.entity.d.ts +6 -6
- package/dist/models/application/app_underwriting_answer.entity.js +26 -26
- package/dist/models/application/application.entity.d.ts +4 -4
- package/dist/models/application/application.entity.js +44 -44
- package/dist/models/application/index.d.ts +3 -3
- package/dist/models/application/index.js +4 -4
- package/dist/models/core/org_staff.entity.d.ts +1 -0
- package/dist/models/core/org_staff.entity.js +7 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApplicationEntity } from
|
|
2
|
-
import { _BaseEntity } from
|
|
3
|
-
import { AppPersonRole, Gender, IdentifierType } from
|
|
4
|
-
export declare class
|
|
1
|
+
import { ApplicationEntity } from "./application.entity";
|
|
2
|
+
import { _BaseEntity } from "../_base_entity";
|
|
3
|
+
import { AppPersonRole, Gender, IdentifierType } from "../../types";
|
|
4
|
+
export declare class AppPersonEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
application_id: string;
|
|
7
7
|
role: AppPersonRole;
|
|
@@ -9,103 +9,103 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.AppPersonEntity = void 0;
|
|
13
13
|
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
|
-
let
|
|
17
|
+
let AppPersonEntity = class AppPersonEntity extends _base_entity_1._BaseEntity {
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.AppPersonEntity = AppPersonEntity;
|
|
20
20
|
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], AppPersonEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
|
-
(0, typeorm_1.Column)({ type:
|
|
26
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], AppPersonEntity.prototype, "application_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Index)(),
|
|
31
|
-
(0, typeorm_1.Column)({ type:
|
|
31
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
33
|
+
], AppPersonEntity.prototype, "role", void 0);
|
|
34
34
|
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type:
|
|
35
|
+
(0, typeorm_1.Column)({ type: "int", default: 1 }),
|
|
36
36
|
__metadata("design:type", Number)
|
|
37
|
-
],
|
|
37
|
+
], AppPersonEntity.prototype, "sequence_no", void 0);
|
|
38
38
|
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ type:
|
|
39
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
40
40
|
__metadata("design:type", Object)
|
|
41
|
-
],
|
|
41
|
+
], AppPersonEntity.prototype, "first_name", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type:
|
|
43
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
44
44
|
__metadata("design:type", Object)
|
|
45
|
-
],
|
|
45
|
+
], AppPersonEntity.prototype, "last_name", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type:
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
48
48
|
__metadata("design:type", Object)
|
|
49
|
-
],
|
|
49
|
+
], AppPersonEntity.prototype, "first_name_kh", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ type:
|
|
51
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
52
52
|
__metadata("design:type", Object)
|
|
53
|
-
],
|
|
53
|
+
], AppPersonEntity.prototype, "last_name_kh", void 0);
|
|
54
54
|
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ type:
|
|
55
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200 }),
|
|
56
56
|
__metadata("design:type", Object)
|
|
57
|
-
],
|
|
57
|
+
], AppPersonEntity.prototype, "full_name", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type:
|
|
59
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
60
60
|
__metadata("design:type", Object)
|
|
61
|
-
],
|
|
61
|
+
], AppPersonEntity.prototype, "full_name_kh", void 0);
|
|
62
62
|
__decorate([
|
|
63
63
|
(0, typeorm_1.Index)(),
|
|
64
|
-
(0, typeorm_1.Column)({ type:
|
|
64
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
|
|
65
65
|
__metadata("design:type", Object)
|
|
66
|
-
],
|
|
66
|
+
], AppPersonEntity.prototype, "gender", void 0);
|
|
67
67
|
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({ type:
|
|
68
|
+
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
69
69
|
__metadata("design:type", Object)
|
|
70
|
-
],
|
|
70
|
+
], AppPersonEntity.prototype, "date_of_birth", void 0);
|
|
71
71
|
__decorate([
|
|
72
|
-
(0, typeorm_1.Column)({ type:
|
|
72
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
73
73
|
__metadata("design:type", Object)
|
|
74
|
-
],
|
|
74
|
+
], AppPersonEntity.prototype, "nationality_id", void 0);
|
|
75
75
|
__decorate([
|
|
76
76
|
(0, typeorm_1.Index)(),
|
|
77
|
-
(0, typeorm_1.Column)({ type:
|
|
77
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
78
78
|
__metadata("design:type", Object)
|
|
79
|
-
],
|
|
79
|
+
], AppPersonEntity.prototype, "identifier_type", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
(0, typeorm_1.Index)(),
|
|
82
|
-
(0, typeorm_1.Column)({ type:
|
|
82
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
83
83
|
__metadata("design:type", Object)
|
|
84
|
-
],
|
|
84
|
+
], AppPersonEntity.prototype, "identifier_no", void 0);
|
|
85
85
|
__decorate([
|
|
86
86
|
(0, typeorm_1.Index)(),
|
|
87
|
-
(0, typeorm_1.Column)({ type:
|
|
87
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
88
88
|
__metadata("design:type", Object)
|
|
89
|
-
],
|
|
89
|
+
], AppPersonEntity.prototype, "phone_number", void 0);
|
|
90
90
|
__decorate([
|
|
91
91
|
(0, typeorm_1.Index)(),
|
|
92
|
-
(0, typeorm_1.Column)({ type:
|
|
92
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
93
93
|
__metadata("design:type", Object)
|
|
94
|
-
],
|
|
94
|
+
], AppPersonEntity.prototype, "email", void 0);
|
|
95
95
|
__decorate([
|
|
96
|
-
(0, typeorm_1.Column)({ type:
|
|
96
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
97
97
|
__metadata("design:type", Object)
|
|
98
|
-
],
|
|
98
|
+
], AppPersonEntity.prototype, "relationship_id", void 0);
|
|
99
99
|
__decorate([
|
|
100
|
-
(0, typeorm_1.Column)({ type:
|
|
100
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
101
101
|
__metadata("design:type", Boolean)
|
|
102
|
-
],
|
|
102
|
+
], AppPersonEntity.prototype, "is_active", void 0);
|
|
103
103
|
__decorate([
|
|
104
|
-
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete:
|
|
105
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
104
|
+
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete: "CASCADE" }),
|
|
105
|
+
(0, typeorm_1.JoinColumn)({ name: "application_id" }),
|
|
106
106
|
__metadata("design:type", application_entity_1.ApplicationEntity)
|
|
107
|
-
],
|
|
108
|
-
exports.
|
|
109
|
-
(0, typeorm_1.Entity)({ schema:
|
|
110
|
-
(0, typeorm_1.Unique)(
|
|
111
|
-
],
|
|
107
|
+
], AppPersonEntity.prototype, "application", void 0);
|
|
108
|
+
exports.AppPersonEntity = AppPersonEntity = __decorate([
|
|
109
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "app_persons" }),
|
|
110
|
+
(0, typeorm_1.Unique)("uq_app_person_role_seq", ["application_id", "role", "sequence_no"])
|
|
111
|
+
], AppPersonEntity);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _BaseEntity } from
|
|
2
|
-
import { ApplicationEntity } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { _BaseEntity } from "../_base_entity";
|
|
2
|
+
import { ApplicationEntity } from "./application.entity";
|
|
3
|
+
import { AppCoverageEntity } from "./app_coverage.entity";
|
|
4
|
+
import { UnderwritingQuestionEntity } from "./underwriting_question.entity";
|
|
5
|
+
import { AppPersonEntity } from "./app_person.entity";
|
|
6
6
|
export declare class AppUnderwritingAnswerEntity extends _BaseEntity {
|
|
7
7
|
id: string;
|
|
8
8
|
application_id: string;
|
|
@@ -16,7 +16,7 @@ export declare class AppUnderwritingAnswerEntity extends _BaseEntity {
|
|
|
16
16
|
remark?: string | null;
|
|
17
17
|
sequence_no: number;
|
|
18
18
|
application?: ApplicationEntity;
|
|
19
|
-
application_person?:
|
|
19
|
+
application_person?: AppPersonEntity | null;
|
|
20
20
|
app_coverage?: AppCoverageEntity | null;
|
|
21
21
|
question?: UnderwritingQuestionEntity;
|
|
22
22
|
}
|
|
@@ -13,86 +13,86 @@ exports.AppUnderwritingAnswerEntity = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const application_entity_1 = require("./application.entity");
|
|
16
|
-
const app_person_entity_1 = require("./app_person.entity");
|
|
17
16
|
const app_coverage_entity_1 = require("./app_coverage.entity");
|
|
18
17
|
const underwriting_question_entity_1 = require("./underwriting_question.entity");
|
|
18
|
+
const app_person_entity_1 = require("./app_person.entity");
|
|
19
19
|
let AppUnderwritingAnswerEntity = class AppUnderwritingAnswerEntity extends _base_entity_1._BaseEntity {
|
|
20
20
|
};
|
|
21
21
|
exports.AppUnderwritingAnswerEntity = AppUnderwritingAnswerEntity;
|
|
22
22
|
__decorate([
|
|
23
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
23
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
24
24
|
__metadata("design:type", String)
|
|
25
25
|
], AppUnderwritingAnswerEntity.prototype, "id", void 0);
|
|
26
26
|
__decorate([
|
|
27
27
|
(0, typeorm_1.Index)(),
|
|
28
|
-
(0, typeorm_1.Column)({ type:
|
|
28
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
29
29
|
__metadata("design:type", String)
|
|
30
30
|
], AppUnderwritingAnswerEntity.prototype, "application_id", void 0);
|
|
31
31
|
__decorate([
|
|
32
32
|
(0, typeorm_1.Index)(),
|
|
33
|
-
(0, typeorm_1.Column)({ type:
|
|
33
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
34
34
|
__metadata("design:type", Object)
|
|
35
35
|
], AppUnderwritingAnswerEntity.prototype, "application_person_id", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, typeorm_1.Index)(),
|
|
38
|
-
(0, typeorm_1.Column)({ type:
|
|
38
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
39
39
|
__metadata("design:type", Object)
|
|
40
40
|
], AppUnderwritingAnswerEntity.prototype, "app_coverage_id", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.Index)(),
|
|
43
|
-
(0, typeorm_1.Column)({ type:
|
|
43
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
44
44
|
__metadata("design:type", String)
|
|
45
45
|
], AppUnderwritingAnswerEntity.prototype, "question_id", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type:
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 2000, nullable: true }),
|
|
48
48
|
__metadata("design:type", Object)
|
|
49
49
|
], AppUnderwritingAnswerEntity.prototype, "answer_text", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ type:
|
|
51
|
+
(0, typeorm_1.Column)({ type: "numeric", precision: 18, scale: 6, nullable: true }),
|
|
52
52
|
__metadata("design:type", Object)
|
|
53
53
|
], AppUnderwritingAnswerEntity.prototype, "answer_number", void 0);
|
|
54
54
|
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ type:
|
|
55
|
+
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
56
56
|
__metadata("design:type", Object)
|
|
57
57
|
], AppUnderwritingAnswerEntity.prototype, "answer_date", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type:
|
|
59
|
+
(0, typeorm_1.Column)({ type: "boolean", nullable: true }),
|
|
60
60
|
__metadata("design:type", Object)
|
|
61
61
|
], AppUnderwritingAnswerEntity.prototype, "answer_bool", void 0);
|
|
62
62
|
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type:
|
|
63
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 2000, nullable: true }),
|
|
64
64
|
__metadata("design:type", Object)
|
|
65
65
|
], AppUnderwritingAnswerEntity.prototype, "remark", void 0);
|
|
66
66
|
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({ type:
|
|
67
|
+
(0, typeorm_1.Column)({ type: "integer", default: 1 }),
|
|
68
68
|
__metadata("design:type", Number)
|
|
69
69
|
], AppUnderwritingAnswerEntity.prototype, "sequence_no", void 0);
|
|
70
70
|
__decorate([
|
|
71
|
-
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete:
|
|
72
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
71
|
+
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete: "RESTRICT" }),
|
|
72
|
+
(0, typeorm_1.JoinColumn)({ name: "application_id" }),
|
|
73
73
|
__metadata("design:type", application_entity_1.ApplicationEntity)
|
|
74
74
|
], AppUnderwritingAnswerEntity.prototype, "application", void 0);
|
|
75
75
|
__decorate([
|
|
76
|
-
(0, typeorm_1.ManyToOne)(() => app_person_entity_1.
|
|
77
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
76
|
+
(0, typeorm_1.ManyToOne)(() => app_person_entity_1.AppPersonEntity, { onDelete: "RESTRICT" }),
|
|
77
|
+
(0, typeorm_1.JoinColumn)({ name: "application_person_id" }),
|
|
78
78
|
__metadata("design:type", Object)
|
|
79
79
|
], AppUnderwritingAnswerEntity.prototype, "application_person", void 0);
|
|
80
80
|
__decorate([
|
|
81
|
-
(0, typeorm_1.ManyToOne)(() => app_coverage_entity_1.AppCoverageEntity, { onDelete:
|
|
82
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
81
|
+
(0, typeorm_1.ManyToOne)(() => app_coverage_entity_1.AppCoverageEntity, { onDelete: "RESTRICT" }),
|
|
82
|
+
(0, typeorm_1.JoinColumn)({ name: "app_coverage_id" }),
|
|
83
83
|
__metadata("design:type", Object)
|
|
84
84
|
], AppUnderwritingAnswerEntity.prototype, "app_coverage", void 0);
|
|
85
85
|
__decorate([
|
|
86
|
-
(0, typeorm_1.ManyToOne)(() => underwriting_question_entity_1.UnderwritingQuestionEntity, { onDelete:
|
|
87
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
86
|
+
(0, typeorm_1.ManyToOne)(() => underwriting_question_entity_1.UnderwritingQuestionEntity, { onDelete: "RESTRICT" }),
|
|
87
|
+
(0, typeorm_1.JoinColumn)({ name: "question_id" }),
|
|
88
88
|
__metadata("design:type", underwriting_question_entity_1.UnderwritingQuestionEntity)
|
|
89
89
|
], AppUnderwritingAnswerEntity.prototype, "question", void 0);
|
|
90
90
|
exports.AppUnderwritingAnswerEntity = AppUnderwritingAnswerEntity = __decorate([
|
|
91
|
-
(0, typeorm_1.Entity)({ schema:
|
|
92
|
-
(0, typeorm_1.Unique)(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "app_underwriting_answers" }),
|
|
92
|
+
(0, typeorm_1.Unique)("uq_app_uw_ans_scope_question", [
|
|
93
|
+
"application_id",
|
|
94
|
+
"application_person_id",
|
|
95
|
+
"app_coverage_id",
|
|
96
|
+
"question_id",
|
|
97
97
|
])
|
|
98
98
|
], AppUnderwritingAnswerEntity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _BaseEntity } from
|
|
2
|
-
import { ApplicationStatus, AppPhLaRelation } from
|
|
3
|
-
import { OrganizationBranchEntity, OrganizationEntity, OrganizationStaffEntity } from
|
|
1
|
+
import { _BaseEntity } from "../_base_entity";
|
|
2
|
+
import { ApplicationStatus, AppPhLaRelation } from "../../types";
|
|
3
|
+
import { OrganizationBranchEntity, OrganizationEntity, OrganizationStaffEntity } from "../core";
|
|
4
4
|
export declare class ApplicationEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
application_no: string;
|
|
@@ -19,7 +19,7 @@ export declare class ApplicationEntity extends _BaseEntity {
|
|
|
19
19
|
rejected_at?: Date | null;
|
|
20
20
|
rejection_reason?: string | null;
|
|
21
21
|
transferred_at?: Date | null;
|
|
22
|
-
product_id
|
|
22
|
+
product_id?: string | null;
|
|
23
23
|
product_plan_id?: string | null;
|
|
24
24
|
currency?: string | null;
|
|
25
25
|
sum_assured?: number | null;
|
|
@@ -18,174 +18,174 @@ let ApplicationEntity = class ApplicationEntity extends _base_entity_1._BaseEnti
|
|
|
18
18
|
};
|
|
19
19
|
exports.ApplicationEntity = ApplicationEntity;
|
|
20
20
|
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], ApplicationEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
|
-
(0, typeorm_1.Column)({ type:
|
|
26
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, unique: true }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], ApplicationEntity.prototype, "application_no", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type:
|
|
30
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, default: types_1.AppPhLaRelation.SamePerson }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], ApplicationEntity.prototype, "ph_la_relation", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, typeorm_1.Index)(),
|
|
35
|
-
(0, typeorm_1.Column)({ type:
|
|
35
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
36
36
|
__metadata("design:type", Object)
|
|
37
37
|
], ApplicationEntity.prototype, "external_ref", void 0);
|
|
38
38
|
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ type:
|
|
39
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
40
40
|
__metadata("design:type", Object)
|
|
41
41
|
], ApplicationEntity.prototype, "legacy_id", void 0);
|
|
42
42
|
__decorate([
|
|
43
43
|
(0, typeorm_1.Index)(),
|
|
44
|
-
(0, typeorm_1.Column)({ type:
|
|
44
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], ApplicationEntity.prototype, "org_id", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, typeorm_1.Index)(),
|
|
49
|
-
(0, typeorm_1.Column)({ type:
|
|
49
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
50
50
|
__metadata("design:type", Object)
|
|
51
51
|
], ApplicationEntity.prototype, "org_branch_id", void 0);
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, typeorm_1.Index)(),
|
|
54
|
-
(0, typeorm_1.Column)({ type:
|
|
54
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
55
55
|
__metadata("design:type", Object)
|
|
56
56
|
], ApplicationEntity.prototype, "channel_id", void 0);
|
|
57
57
|
__decorate([
|
|
58
58
|
(0, typeorm_1.Index)(),
|
|
59
|
-
(0, typeorm_1.Column)({ type:
|
|
59
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
60
60
|
__metadata("design:type", String)
|
|
61
61
|
], ApplicationEntity.prototype, "owner_org_staff_id", void 0);
|
|
62
62
|
__decorate([
|
|
63
63
|
(0, typeorm_1.Index)(),
|
|
64
|
-
(0, typeorm_1.Column)({ type:
|
|
64
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
65
65
|
__metadata("design:type", Object)
|
|
66
66
|
], ApplicationEntity.prototype, "assigned_org_staff_id", void 0);
|
|
67
67
|
__decorate([
|
|
68
68
|
(0, typeorm_1.Index)(),
|
|
69
|
-
(0, typeorm_1.Column)({ type:
|
|
69
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
70
70
|
__metadata("design:type", String)
|
|
71
71
|
], ApplicationEntity.prototype, "status", void 0);
|
|
72
72
|
__decorate([
|
|
73
|
-
(0, typeorm_1.Column)({ type:
|
|
73
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
74
74
|
__metadata("design:type", Object)
|
|
75
75
|
], ApplicationEntity.prototype, "submitted_at", void 0);
|
|
76
76
|
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({ type:
|
|
77
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
78
78
|
__metadata("design:type", Object)
|
|
79
79
|
], ApplicationEntity.prototype, "review_started_at", void 0);
|
|
80
80
|
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ type:
|
|
81
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
82
82
|
__metadata("design:type", Object)
|
|
83
83
|
], ApplicationEntity.prototype, "accepted_at", void 0);
|
|
84
84
|
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({ type:
|
|
85
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
86
86
|
__metadata("design:type", Object)
|
|
87
87
|
], ApplicationEntity.prototype, "rejected_at", void 0);
|
|
88
88
|
__decorate([
|
|
89
|
-
(0, typeorm_1.Column)({ type:
|
|
89
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
90
90
|
__metadata("design:type", Object)
|
|
91
91
|
], ApplicationEntity.prototype, "rejection_reason", void 0);
|
|
92
92
|
__decorate([
|
|
93
|
-
(0, typeorm_1.Column)({ type:
|
|
93
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
94
94
|
__metadata("design:type", Object)
|
|
95
95
|
], ApplicationEntity.prototype, "transferred_at", void 0);
|
|
96
96
|
__decorate([
|
|
97
97
|
(0, typeorm_1.Index)(),
|
|
98
|
-
(0, typeorm_1.Column)({ type:
|
|
99
|
-
__metadata("design:type",
|
|
98
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
100
|
], ApplicationEntity.prototype, "product_id", void 0);
|
|
101
101
|
__decorate([
|
|
102
|
-
(0, typeorm_1.Column)({ type:
|
|
102
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
103
103
|
__metadata("design:type", Object)
|
|
104
104
|
], ApplicationEntity.prototype, "product_plan_id", void 0);
|
|
105
105
|
__decorate([
|
|
106
|
-
(0, typeorm_1.Column)({ type:
|
|
106
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
|
|
107
107
|
__metadata("design:type", Object)
|
|
108
108
|
], ApplicationEntity.prototype, "currency", void 0);
|
|
109
109
|
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({ type:
|
|
110
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
111
111
|
__metadata("design:type", Object)
|
|
112
112
|
], ApplicationEntity.prototype, "sum_assured", void 0);
|
|
113
113
|
__decorate([
|
|
114
|
-
(0, typeorm_1.Column)({ type:
|
|
114
|
+
(0, typeorm_1.Column)({ type: "numeric", nullable: true }),
|
|
115
115
|
__metadata("design:type", Object)
|
|
116
116
|
], ApplicationEntity.prototype, "mode_premium_amount", void 0);
|
|
117
117
|
__decorate([
|
|
118
|
-
(0, typeorm_1.Column)({ type:
|
|
118
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
119
119
|
__metadata("design:type", Object)
|
|
120
120
|
], ApplicationEntity.prototype, "product_payment_mode_id", void 0);
|
|
121
121
|
__decorate([
|
|
122
|
-
(0, typeorm_1.Column)({ type:
|
|
122
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
123
123
|
__metadata("design:type", Object)
|
|
124
124
|
], ApplicationEntity.prototype, "product_policy_term_id", void 0);
|
|
125
125
|
__decorate([
|
|
126
126
|
(0, typeorm_1.Index)(),
|
|
127
|
-
(0, typeorm_1.Column)({ type:
|
|
127
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
128
128
|
__metadata("design:type", String)
|
|
129
129
|
], ApplicationEntity.prototype, "created_by_user_id", void 0);
|
|
130
130
|
__decorate([
|
|
131
131
|
(0, typeorm_1.Index)(),
|
|
132
|
-
(0, typeorm_1.Column)({ type:
|
|
132
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
133
133
|
__metadata("design:type", Object)
|
|
134
134
|
], ApplicationEntity.prototype, "updated_by_user_id", void 0);
|
|
135
135
|
__decorate([
|
|
136
136
|
(0, typeorm_1.Index)(),
|
|
137
|
-
(0, typeorm_1.Column)({ type:
|
|
137
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
138
138
|
__metadata("design:type", Object)
|
|
139
139
|
], ApplicationEntity.prototype, "submitted_by_user_id", void 0);
|
|
140
140
|
__decorate([
|
|
141
141
|
(0, typeorm_1.Index)(),
|
|
142
|
-
(0, typeorm_1.Column)({ type:
|
|
142
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
143
143
|
__metadata("design:type", Object)
|
|
144
144
|
], ApplicationEntity.prototype, "reviewed_by_user_id", void 0);
|
|
145
145
|
__decorate([
|
|
146
146
|
(0, typeorm_1.Index)(),
|
|
147
|
-
(0, typeorm_1.Column)({ type:
|
|
147
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
148
148
|
__metadata("design:type", Object)
|
|
149
149
|
], ApplicationEntity.prototype, "accepted_by_user_id", void 0);
|
|
150
150
|
__decorate([
|
|
151
151
|
(0, typeorm_1.Index)(),
|
|
152
|
-
(0, typeorm_1.Column)({ type:
|
|
152
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
153
153
|
__metadata("design:type", Object)
|
|
154
154
|
], ApplicationEntity.prototype, "rejected_by_user_id", void 0);
|
|
155
155
|
__decorate([
|
|
156
156
|
(0, typeorm_1.Index)(),
|
|
157
|
-
(0, typeorm_1.Column)({ type:
|
|
157
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
158
158
|
__metadata("design:type", Object)
|
|
159
159
|
], ApplicationEntity.prototype, "transferred_by_user_id", void 0);
|
|
160
160
|
__decorate([
|
|
161
|
-
(0, typeorm_1.Column)({ type:
|
|
161
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
162
162
|
__metadata("design:type", Boolean)
|
|
163
163
|
], ApplicationEntity.prototype, "is_active", void 0);
|
|
164
164
|
__decorate([
|
|
165
|
-
(0, typeorm_1.Column)({ type:
|
|
165
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
166
166
|
__metadata("design:type", Boolean)
|
|
167
167
|
], ApplicationEntity.prototype, "is_migrated", void 0);
|
|
168
168
|
__decorate([
|
|
169
|
-
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationEntity, { onDelete:
|
|
170
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
169
|
+
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationEntity, { onDelete: "RESTRICT" }),
|
|
170
|
+
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
171
171
|
__metadata("design:type", core_1.OrganizationEntity)
|
|
172
172
|
], ApplicationEntity.prototype, "org", void 0);
|
|
173
173
|
__decorate([
|
|
174
|
-
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete:
|
|
175
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
174
|
+
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
|
|
175
|
+
(0, typeorm_1.JoinColumn)({ name: "owner_org_staff_id" }),
|
|
176
176
|
__metadata("design:type", core_1.OrganizationStaffEntity)
|
|
177
177
|
], ApplicationEntity.prototype, "owner_org_staff", void 0);
|
|
178
178
|
__decorate([
|
|
179
|
-
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete:
|
|
180
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
179
|
+
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete: "SET NULL" }),
|
|
180
|
+
(0, typeorm_1.JoinColumn)({ name: "assigned_org_staff_id" }),
|
|
181
181
|
__metadata("design:type", Object)
|
|
182
182
|
], ApplicationEntity.prototype, "assigned_org_staff", void 0);
|
|
183
183
|
__decorate([
|
|
184
|
-
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationBranchEntity, { onDelete:
|
|
185
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
184
|
+
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationBranchEntity, { onDelete: "RESTRICT" }),
|
|
185
|
+
(0, typeorm_1.JoinColumn)({ name: "org_branch_id" }),
|
|
186
186
|
__metadata("design:type", Object)
|
|
187
187
|
], ApplicationEntity.prototype, "org_branch", void 0);
|
|
188
188
|
exports.ApplicationEntity = ApplicationEntity = __decorate([
|
|
189
|
-
(0, typeorm_1.Entity)({ schema:
|
|
190
|
-
(0, typeorm_1.Unique)(
|
|
189
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "applications" }),
|
|
190
|
+
(0, typeorm_1.Unique)("uq_application_org_app_no", ["org_id", "application_no"])
|
|
191
191
|
], ApplicationEntity);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ApplicationEntity } from "./application.entity";
|
|
2
2
|
import { AppBeneficiaryEntity } from "./app_beneficiary.entity";
|
|
3
3
|
import { AppCoverageEntity } from "./app_coverage.entity";
|
|
4
|
-
import {
|
|
4
|
+
import { AppPersonEntity } from "./app_person.entity";
|
|
5
5
|
import { AppUnderwritingAnswerEntity } from "./app_underwriting_answer.entity";
|
|
6
6
|
import { UnderwritingQuestionEntity } from "./underwriting_question.entity";
|
|
7
|
-
export declare const APPLICATION_ENTITIES: readonly [typeof ApplicationEntity, typeof AppBeneficiaryEntity, typeof AppCoverageEntity, typeof
|
|
8
|
-
export { ApplicationEntity, AppBeneficiaryEntity, AppCoverageEntity,
|
|
7
|
+
export declare const APPLICATION_ENTITIES: readonly [typeof ApplicationEntity, typeof AppBeneficiaryEntity, typeof AppCoverageEntity, typeof AppPersonEntity, typeof AppUnderwritingAnswerEntity, typeof UnderwritingQuestionEntity];
|
|
8
|
+
export { ApplicationEntity, AppBeneficiaryEntity, AppCoverageEntity, AppPersonEntity, AppUnderwritingAnswerEntity, UnderwritingQuestionEntity, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnderwritingQuestionEntity = exports.AppUnderwritingAnswerEntity = exports.
|
|
3
|
+
exports.UnderwritingQuestionEntity = exports.AppUnderwritingAnswerEntity = exports.AppPersonEntity = exports.AppCoverageEntity = exports.AppBeneficiaryEntity = exports.ApplicationEntity = exports.APPLICATION_ENTITIES = void 0;
|
|
4
4
|
const application_entity_1 = require("./application.entity");
|
|
5
5
|
Object.defineProperty(exports, "ApplicationEntity", { enumerable: true, get: function () { return application_entity_1.ApplicationEntity; } });
|
|
6
6
|
const app_beneficiary_entity_1 = require("./app_beneficiary.entity");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "AppBeneficiaryEntity", { enumerable: true, get:
|
|
|
8
8
|
const app_coverage_entity_1 = require("./app_coverage.entity");
|
|
9
9
|
Object.defineProperty(exports, "AppCoverageEntity", { enumerable: true, get: function () { return app_coverage_entity_1.AppCoverageEntity; } });
|
|
10
10
|
const app_person_entity_1 = require("./app_person.entity");
|
|
11
|
-
Object.defineProperty(exports, "
|
|
11
|
+
Object.defineProperty(exports, "AppPersonEntity", { enumerable: true, get: function () { return app_person_entity_1.AppPersonEntity; } });
|
|
12
12
|
const app_underwriting_answer_entity_1 = require("./app_underwriting_answer.entity");
|
|
13
13
|
Object.defineProperty(exports, "AppUnderwritingAnswerEntity", { enumerable: true, get: function () { return app_underwriting_answer_entity_1.AppUnderwritingAnswerEntity; } });
|
|
14
14
|
const underwriting_question_entity_1 = require("./underwriting_question.entity");
|
|
@@ -17,7 +17,7 @@ exports.APPLICATION_ENTITIES = [
|
|
|
17
17
|
application_entity_1.ApplicationEntity,
|
|
18
18
|
app_beneficiary_entity_1.AppBeneficiaryEntity,
|
|
19
19
|
app_coverage_entity_1.AppCoverageEntity,
|
|
20
|
-
app_person_entity_1.
|
|
20
|
+
app_person_entity_1.AppPersonEntity,
|
|
21
21
|
app_underwriting_answer_entity_1.AppUnderwritingAnswerEntity,
|
|
22
|
-
underwriting_question_entity_1.UnderwritingQuestionEntity
|
|
22
|
+
underwriting_question_entity_1.UnderwritingQuestionEntity,
|
|
23
23
|
];
|
|
@@ -59,6 +59,11 @@ __decorate([
|
|
|
59
59
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
60
60
|
__metadata("design:type", Boolean)
|
|
61
61
|
], OrganizationStaffEntity.prototype, "is_active", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Index)(),
|
|
64
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], OrganizationStaffEntity.prototype, "auth_user_id", void 0);
|
|
62
67
|
__decorate([
|
|
63
68
|
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
64
69
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
@@ -72,5 +77,6 @@ __decorate([
|
|
|
72
77
|
exports.OrganizationStaffEntity = OrganizationStaffEntity = __decorate([
|
|
73
78
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_staffs" }),
|
|
74
79
|
(0, typeorm_1.Unique)("uq_org_staff_staff_code", ["org_id", "staff_code"]),
|
|
75
|
-
(0, typeorm_1.Unique)("uq_org_staff_org_staff", ["org_id", "staff_id"])
|
|
80
|
+
(0, typeorm_1.Unique)("uq_org_staff_org_staff", ["org_id", "staff_id"]),
|
|
81
|
+
(0, typeorm_1.Unique)("uq_org_staff_org_user", ["org_id", "user_id"])
|
|
76
82
|
], OrganizationStaffEntity);
|