plac-micro-common 1.2.29 → 1.2.31

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.
@@ -0,0 +1,22 @@
1
+ import { _BaseEntity } from '../_base_entity';
2
+ import { Application } from './application.entity';
3
+ import { AppPerson } from './app_person.entity';
4
+ import { AppCoverage } from './app_coverage.entity';
5
+ import { UnderwritingQuestion } from './underwriting_question.entity';
6
+ export declare class AppUnderwritingAnswer extends _BaseEntity {
7
+ id: string;
8
+ application_id: string;
9
+ application_person_id: string | null;
10
+ app_coverage_id: string | null;
11
+ question_id: string;
12
+ answer_text: string | null;
13
+ answer_number: string | null;
14
+ answer_date: string | null;
15
+ answer_bool: boolean | null;
16
+ remark: string | null;
17
+ sequence_no: number;
18
+ application?: Application;
19
+ application_person?: AppPerson | null;
20
+ app_coverage?: AppCoverage | null;
21
+ question?: UnderwritingQuestion;
22
+ }
@@ -0,0 +1,98 @@
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.AppUnderwritingAnswer = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ const application_entity_1 = require("./application.entity");
16
+ const app_person_entity_1 = require("./app_person.entity");
17
+ const app_coverage_entity_1 = require("./app_coverage.entity");
18
+ const underwriting_question_entity_1 = require("./underwriting_question.entity");
19
+ let AppUnderwritingAnswer = class AppUnderwritingAnswer extends _base_entity_1._BaseEntity {
20
+ };
21
+ exports.AppUnderwritingAnswer = AppUnderwritingAnswer;
22
+ __decorate([
23
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
+ __metadata("design:type", String)
25
+ ], AppUnderwritingAnswer.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Index)(),
28
+ (0, typeorm_1.Column)({ type: 'uuid' }),
29
+ __metadata("design:type", String)
30
+ ], AppUnderwritingAnswer.prototype, "application_id", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Index)(),
33
+ (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], AppUnderwritingAnswer.prototype, "application_person_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Index)(),
38
+ (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], AppUnderwritingAnswer.prototype, "app_coverage_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Index)(),
43
+ (0, typeorm_1.Column)({ type: 'uuid' }),
44
+ __metadata("design:type", String)
45
+ ], AppUnderwritingAnswer.prototype, "question_id", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'varchar', length: 2000, nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], AppUnderwritingAnswer.prototype, "answer_text", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ type: 'numeric', precision: 18, scale: 6, nullable: true }),
52
+ __metadata("design:type", Object)
53
+ ], AppUnderwritingAnswer.prototype, "answer_number", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
56
+ __metadata("design:type", Object)
57
+ ], AppUnderwritingAnswer.prototype, "answer_date", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
60
+ __metadata("design:type", Object)
61
+ ], AppUnderwritingAnswer.prototype, "answer_bool", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.Column)({ type: 'varchar', length: 2000, nullable: true }),
64
+ __metadata("design:type", Object)
65
+ ], AppUnderwritingAnswer.prototype, "remark", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({ type: 'integer', default: 1 }),
68
+ __metadata("design:type", Number)
69
+ ], AppUnderwritingAnswer.prototype, "sequence_no", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.ManyToOne)(() => application_entity_1.Application, { onDelete: 'RESTRICT' }),
72
+ (0, typeorm_1.JoinColumn)({ name: 'application_id' }),
73
+ __metadata("design:type", application_entity_1.Application)
74
+ ], AppUnderwritingAnswer.prototype, "application", void 0);
75
+ __decorate([
76
+ (0, typeorm_1.ManyToOne)(() => app_person_entity_1.AppPerson, { onDelete: 'RESTRICT' }),
77
+ (0, typeorm_1.JoinColumn)({ name: 'application_person_id' }),
78
+ __metadata("design:type", Object)
79
+ ], AppUnderwritingAnswer.prototype, "application_person", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.ManyToOne)(() => app_coverage_entity_1.AppCoverage, { onDelete: 'RESTRICT' }),
82
+ (0, typeorm_1.JoinColumn)({ name: 'app_coverage_id' }),
83
+ __metadata("design:type", Object)
84
+ ], AppUnderwritingAnswer.prototype, "app_coverage", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.ManyToOne)(() => underwriting_question_entity_1.UnderwritingQuestion, { onDelete: 'RESTRICT' }),
87
+ (0, typeorm_1.JoinColumn)({ name: 'question_id' }),
88
+ __metadata("design:type", underwriting_question_entity_1.UnderwritingQuestion)
89
+ ], AppUnderwritingAnswer.prototype, "question", void 0);
90
+ exports.AppUnderwritingAnswer = AppUnderwritingAnswer = __decorate([
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
+ ])
98
+ ], AppUnderwritingAnswer);
@@ -2,5 +2,7 @@ import { Application } from "./application.entity";
2
2
  import { AppBeneficiary } from "./app_beneficiary.entity";
3
3
  import { AppCoverage } from "./app_coverage.entity";
4
4
  import { AppPerson } from "./app_person.entity";
5
- export declare const APPLICATION_ENTITIES: readonly [typeof Application, typeof AppBeneficiary, typeof AppCoverage, typeof AppPerson];
6
- export { Application, AppBeneficiary, AppCoverage, AppPerson };
5
+ import { AppUnderwritingAnswer } from "./app_underwriting_answer.entity";
6
+ import { UnderwritingQuestion } from "./underwriting_question.entity";
7
+ export declare const APPLICATION_ENTITIES: readonly [typeof Application, typeof AppBeneficiary, typeof AppCoverage, typeof AppPerson, typeof AppUnderwritingAnswer, typeof UnderwritingQuestion];
8
+ export { Application, AppBeneficiary, AppCoverage, AppPerson, AppUnderwritingAnswer, UnderwritingQuestion };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppPerson = exports.AppCoverage = exports.AppBeneficiary = exports.Application = exports.APPLICATION_ENTITIES = void 0;
3
+ exports.UnderwritingQuestion = exports.AppUnderwritingAnswer = exports.AppPerson = exports.AppCoverage = exports.AppBeneficiary = exports.Application = exports.APPLICATION_ENTITIES = void 0;
4
4
  const application_entity_1 = require("./application.entity");
5
5
  Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return application_entity_1.Application; } });
6
6
  const app_beneficiary_entity_1 = require("./app_beneficiary.entity");
@@ -9,9 +9,15 @@ const app_coverage_entity_1 = require("./app_coverage.entity");
9
9
  Object.defineProperty(exports, "AppCoverage", { enumerable: true, get: function () { return app_coverage_entity_1.AppCoverage; } });
10
10
  const app_person_entity_1 = require("./app_person.entity");
11
11
  Object.defineProperty(exports, "AppPerson", { enumerable: true, get: function () { return app_person_entity_1.AppPerson; } });
12
+ const app_underwriting_answer_entity_1 = require("./app_underwriting_answer.entity");
13
+ Object.defineProperty(exports, "AppUnderwritingAnswer", { enumerable: true, get: function () { return app_underwriting_answer_entity_1.AppUnderwritingAnswer; } });
14
+ const underwriting_question_entity_1 = require("./underwriting_question.entity");
15
+ Object.defineProperty(exports, "UnderwritingQuestion", { enumerable: true, get: function () { return underwriting_question_entity_1.UnderwritingQuestion; } });
12
16
  exports.APPLICATION_ENTITIES = [
13
17
  application_entity_1.Application,
14
18
  app_beneficiary_entity_1.AppBeneficiary,
15
19
  app_coverage_entity_1.AppCoverage,
16
- app_person_entity_1.AppPerson
20
+ app_person_entity_1.AppPerson,
21
+ app_underwriting_answer_entity_1.AppUnderwritingAnswer,
22
+ underwriting_question_entity_1.UnderwritingQuestion
17
23
  ];
@@ -0,0 +1,12 @@
1
+ import { _BaseEntity } from '../_base_entity';
2
+ import { UwAnswerValueType } from '../../types';
3
+ export declare class UnderwritingQuestion extends _BaseEntity {
4
+ id: string;
5
+ question_code: string;
6
+ question_text: string;
7
+ question_text_kh?: string;
8
+ value_type: UwAnswerValueType;
9
+ is_required: boolean;
10
+ sequence_no: number;
11
+ is_active: boolean;
12
+ }
@@ -0,0 +1,54 @@
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.UnderwritingQuestion = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ const types_1 = require("../../types");
16
+ let UnderwritingQuestion = class UnderwritingQuestion extends _base_entity_1._BaseEntity {
17
+ };
18
+ exports.UnderwritingQuestion = UnderwritingQuestion;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
21
+ __metadata("design:type", String)
22
+ ], UnderwritingQuestion.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Index)(),
25
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
26
+ __metadata("design:type", String)
27
+ ], UnderwritingQuestion.prototype, "question_code", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
30
+ __metadata("design:type", String)
31
+ ], UnderwritingQuestion.prototype, "question_text", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true, length: 500 }),
34
+ __metadata("design:type", String)
35
+ ], UnderwritingQuestion.prototype, "question_text_kh", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20 }),
38
+ __metadata("design:type", String)
39
+ ], UnderwritingQuestion.prototype, "value_type", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
42
+ __metadata("design:type", Boolean)
43
+ ], UnderwritingQuestion.prototype, "is_required", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'integer', default: 1 }),
46
+ __metadata("design:type", Number)
47
+ ], UnderwritingQuestion.prototype, "sequence_no", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
50
+ __metadata("design:type", Boolean)
51
+ ], UnderwritingQuestion.prototype, "is_active", void 0);
52
+ exports.UnderwritingQuestion = UnderwritingQuestion = __decorate([
53
+ (0, typeorm_1.Entity)({ schema: 'application', name: 'underwriting_questions' })
54
+ ], UnderwritingQuestion);
@@ -22,3 +22,9 @@ export declare enum AppCoverageType {
22
22
  Base = "base",
23
23
  Rider = "rider"
24
24
  }
25
+ export declare enum UwAnswerValueType {
26
+ Boolean = "BOOLEAN",
27
+ Text = "TEXT",
28
+ Number = "NUMBER",
29
+ Date = "DATE"
30
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppCoverageType = exports.AppPhLaRelation = exports.AppPersonRole = exports.ApplicationStatus = void 0;
3
+ exports.UwAnswerValueType = exports.AppCoverageType = exports.AppPhLaRelation = exports.AppPersonRole = exports.ApplicationStatus = void 0;
4
4
  var ApplicationStatus;
5
5
  (function (ApplicationStatus) {
6
6
  ApplicationStatus["New"] = "new";
@@ -29,3 +29,10 @@ var AppCoverageType;
29
29
  AppCoverageType["Base"] = "base";
30
30
  AppCoverageType["Rider"] = "rider";
31
31
  })(AppCoverageType || (exports.AppCoverageType = AppCoverageType = {}));
32
+ var UwAnswerValueType;
33
+ (function (UwAnswerValueType) {
34
+ UwAnswerValueType["Boolean"] = "BOOLEAN";
35
+ UwAnswerValueType["Text"] = "TEXT";
36
+ UwAnswerValueType["Number"] = "NUMBER";
37
+ UwAnswerValueType["Date"] = "DATE";
38
+ })(UwAnswerValueType || (exports.UwAnswerValueType = UwAnswerValueType = {}));
@@ -15,8 +15,11 @@ export declare enum PermissionAction {
15
15
  }
16
16
  export declare const PermissionResource: {
17
17
  readonly Application: "application";
18
+ readonly Branch: "branch";
18
19
  readonly Claim: "claim";
20
+ readonly Channel: "channel";
19
21
  readonly Customer: "customer";
22
+ readonly Department: "department";
20
23
  readonly Dashboard: "dashboard";
21
24
  readonly Menu: "menu";
22
25
  readonly Organization: "organization";
@@ -19,8 +19,11 @@ var PermissionAction;
19
19
  })(PermissionAction || (exports.PermissionAction = PermissionAction = {}));
20
20
  exports.PermissionResource = {
21
21
  Application: "application",
22
+ Branch: "branch",
22
23
  Claim: "claim",
24
+ Channel: "channel",
23
25
  Customer: "customer",
26
+ Department: "department",
24
27
  Dashboard: "dashboard",
25
28
  Menu: "menu",
26
29
  Organization: "organization",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.2.29",
3
+ "version": "1.2.31",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {