plac-micro-common 1.2.46 → 1.2.48
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/core/index.d.ts +2 -1
- package/dist/models/core/index.js +17 -0
- package/dist/models/core/product/cash_value.entity.d.ts +19 -0
- package/dist/models/core/product/cash_value.entity.js +87 -0
- package/dist/models/core/product/index.d.ts +18 -0
- package/dist/models/core/product/index.js +53 -0
- package/dist/models/core/product/payment_mode.entity.d.ts +11 -0
- package/dist/models/core/product/payment_mode.entity.js +55 -0
- package/dist/models/core/product/premium_rate_condition.entity.d.ts +15 -0
- package/dist/models/core/product/premium_rate_condition.entity.js +66 -0
- package/dist/models/core/product/premium_rate_value.entity.d.ts +11 -0
- package/dist/models/core/product/premium_rate_value.entity.js +55 -0
- package/dist/models/core/product/product.entity.d.ts +20 -0
- package/dist/models/core/product/product.entity.js +78 -0
- package/dist/models/core/product/product_org.entity.d.ts +13 -0
- package/dist/models/core/product/product_org.entity.js +57 -0
- package/dist/models/core/product/product_payment_mode.entity.d.ts +12 -0
- package/dist/models/core/product/product_payment_mode.entity.js +53 -0
- package/dist/models/core/product/product_plan.entity.d.ts +16 -0
- package/dist/models/core/product/product_plan.entity.js +66 -0
- package/dist/models/core/product/product_rider.entity.d.ts +12 -0
- package/dist/models/core/product/product_rider.entity.js +55 -0
- package/dist/models/core/product/product_term.entity.d.ts +12 -0
- package/dist/models/core/product/product_term.entity.js +55 -0
- package/dist/models/core/product/product_type.entity.d.ts +8 -0
- package/dist/models/core/product/product_type.entity.js +40 -0
- package/dist/models/core/product/promotion.entity.d.ts +15 -0
- package/dist/models/core/product/promotion.entity.js +65 -0
- package/dist/models/core/product/promotion_org.entity.d.ts +11 -0
- package/dist/models/core/product/promotion_org.entity.js +49 -0
- package/dist/models/core/product/promotion_product.entity.d.ts +12 -0
- package/dist/models/core/product/promotion_product.entity.js +61 -0
- package/dist/models/core/product/rider.entity.d.ts +9 -0
- package/dist/models/core/product/rider.entity.js +44 -0
- package/dist/models/core/product/term.entity.d.ts +5 -0
- package/dist/models/core/product/term.entity.js +28 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { DiscountType } from "../../../types";
|
|
3
|
+
export declare class PromotionEntity extends _BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
promotion_code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
name_kh?: string | null;
|
|
8
|
+
discount_type: DiscountType;
|
|
9
|
+
discount_value: number;
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
starts_at?: Date | null;
|
|
12
|
+
ends_at?: Date | null;
|
|
13
|
+
priority: number;
|
|
14
|
+
is_stackable: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.PromotionEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const types_1 = require("../../../types");
|
|
16
|
+
let PromotionEntity = class PromotionEntity extends _base_entity_1._BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.PromotionEntity = PromotionEntity;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], PromotionEntity.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, unique: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PromotionEntity.prototype, "promotion_code", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PromotionEntity.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], PromotionEntity.prototype, "name_kh", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 25, default: types_1.DiscountType.Percentage }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], PromotionEntity.prototype, "discount_type", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: "numeric", precision: 18, scale: 2 }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], PromotionEntity.prototype, "discount_value", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "bool", default: true }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], PromotionEntity.prototype, "is_active", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], PromotionEntity.prototype, "starts_at", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], PromotionEntity.prototype, "ends_at", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "int", default: 100 }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], PromotionEntity.prototype, "priority", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "bool", default: false }),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], PromotionEntity.prototype, "is_stackable", void 0);
|
|
63
|
+
exports.PromotionEntity = PromotionEntity = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "promotions" })
|
|
65
|
+
], PromotionEntity);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { PromotionEntity } from "./promotion.entity";
|
|
3
|
+
import { OrganizationEntity } from "../organization.entity";
|
|
4
|
+
export declare class PromotionOrgEntity extends _BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
promotion_id: string;
|
|
7
|
+
org_id: string;
|
|
8
|
+
is_active: boolean;
|
|
9
|
+
promotion: PromotionEntity;
|
|
10
|
+
org: OrganizationEntity;
|
|
11
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.PromotionOrgEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const promotion_entity_1 = require("./promotion.entity");
|
|
16
|
+
const organization_entity_1 = require("../organization.entity");
|
|
17
|
+
let PromotionOrgEntity = class PromotionOrgEntity extends _base_entity_1._BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.PromotionOrgEntity = PromotionOrgEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], PromotionOrgEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], PromotionOrgEntity.prototype, "promotion_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], PromotionOrgEntity.prototype, "org_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], PromotionOrgEntity.prototype, "is_active", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => promotion_entity_1.PromotionEntity, { onDelete: "CASCADE" }),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: "promotion_id" }),
|
|
39
|
+
__metadata("design:type", promotion_entity_1.PromotionEntity)
|
|
40
|
+
], PromotionOrgEntity.prototype, "promotion", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
44
|
+
__metadata("design:type", organization_entity_1.OrganizationEntity)
|
|
45
|
+
], PromotionOrgEntity.prototype, "org", void 0);
|
|
46
|
+
exports.PromotionOrgEntity = PromotionOrgEntity = __decorate([
|
|
47
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "promotion_orgs" }),
|
|
48
|
+
(0, typeorm_1.Index)(["promotion_id", "org_id"], { unique: true })
|
|
49
|
+
], PromotionOrgEntity);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { DiscountType } from "../../../types";
|
|
3
|
+
export declare class PromotionProductEntity extends _BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
promotion_id: string;
|
|
6
|
+
product_id: string;
|
|
7
|
+
term_year?: number | null;
|
|
8
|
+
payment_mode_id?: string | null;
|
|
9
|
+
discount_type?: DiscountType;
|
|
10
|
+
discount_value?: number | null;
|
|
11
|
+
is_active: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.PromotionProductEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const types_1 = require("../../../types");
|
|
16
|
+
const utils_1 = require("../../../utils");
|
|
17
|
+
let PromotionProductEntity = class PromotionProductEntity extends _base_entity_1._BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.PromotionProductEntity = PromotionProductEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], PromotionProductEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], PromotionProductEntity.prototype, "promotion_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], PromotionProductEntity.prototype, "product_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], PromotionProductEntity.prototype, "term_year", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], PromotionProductEntity.prototype, "payment_mode_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({
|
|
42
|
+
type: "varchar",
|
|
43
|
+
length: 25,
|
|
44
|
+
default: types_1.DiscountType.Percentage,
|
|
45
|
+
nullable: true,
|
|
46
|
+
comment: (0, utils_1.enumToCommentString)(types_1.DiscountType),
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PromotionProductEntity.prototype, "discount_type", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "numeric", precision: 18, scale: 2, nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], PromotionProductEntity.prototype, "discount_value", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], PromotionProductEntity.prototype, "is_active", void 0);
|
|
58
|
+
exports.PromotionProductEntity = PromotionProductEntity = __decorate([
|
|
59
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "promotion_products" }),
|
|
60
|
+
(0, typeorm_1.Index)(["promotion_id", "product_id"], { unique: true })
|
|
61
|
+
], PromotionProductEntity);
|
|
@@ -0,0 +1,44 @@
|
|
|
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.RiderEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
let RiderEntity = class RiderEntity extends _base_entity_1._BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.RiderEntity = RiderEntity;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], RiderEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, unique: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RiderEntity.prototype, "code", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], RiderEntity.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], RiderEntity.prototype, "name_kh", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], RiderEntity.prototype, "description", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], RiderEntity.prototype, "is_active", void 0);
|
|
42
|
+
exports.RiderEntity = RiderEntity = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "riders" })
|
|
44
|
+
], RiderEntity);
|
|
@@ -0,0 +1,28 @@
|
|
|
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.TermEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
let TermEntity = class TermEntity extends _base_entity_1._BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.TermEntity = TermEntity;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], TermEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "integer" }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], TermEntity.prototype, "term_year", void 0);
|
|
26
|
+
exports.TermEntity = TermEntity = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "riders" })
|
|
28
|
+
], TermEntity);
|