plac-micro-common 1.2.47 → 1.2.49
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/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,53 @@
|
|
|
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.ProductPaymentModeEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const payment_mode_entity_1 = require("./payment_mode.entity");
|
|
17
|
+
let ProductPaymentModeEntity = class ProductPaymentModeEntity extends _base_entity_1._BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.ProductPaymentModeEntity = ProductPaymentModeEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ProductPaymentModeEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ProductPaymentModeEntity.prototype, "product_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ProductPaymentModeEntity.prototype, "payment_mode_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], ProductPaymentModeEntity.prototype, "is_default", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], ProductPaymentModeEntity.prototype, "is_active", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
43
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
44
|
+
], ProductPaymentModeEntity.prototype, "product", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => payment_mode_entity_1.PaymentModeEntity),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: "payment_mode_id" }),
|
|
48
|
+
__metadata("design:type", payment_mode_entity_1.PaymentModeEntity)
|
|
49
|
+
], ProductPaymentModeEntity.prototype, "payment_mode", void 0);
|
|
50
|
+
exports.ProductPaymentModeEntity = ProductPaymentModeEntity = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "product_payment_modes" }),
|
|
52
|
+
(0, typeorm_1.Index)("ux_product_payment_modes_product_mode", ["product_id", "payment_mode_id"], { unique: true })
|
|
53
|
+
], ProductPaymentModeEntity);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { ProductEntity } from "./product.entity";
|
|
3
|
+
import { Gender } from "../../../types";
|
|
4
|
+
export declare class ProductPlanEntity extends _BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
product_id: string;
|
|
7
|
+
term_year?: number | null;
|
|
8
|
+
min_sum_assured?: number | null;
|
|
9
|
+
max_sum_assured?: number | null;
|
|
10
|
+
gender?: Gender | null;
|
|
11
|
+
min_age?: number | null;
|
|
12
|
+
max_age?: number | null;
|
|
13
|
+
rider_id?: string | null;
|
|
14
|
+
plan_code: string;
|
|
15
|
+
product: ProductEntity;
|
|
16
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.ProductPlanEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
let ProductPlanEntity = class ProductPlanEntity extends _base_entity_1._BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.ProductPlanEntity = ProductPlanEntity;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ProductPlanEntity.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ProductPlanEntity.prototype, "product_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], ProductPlanEntity.prototype, "term_year", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], ProductPlanEntity.prototype, "min_sum_assured", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], ProductPlanEntity.prototype, "max_sum_assured", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 1, nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], ProductPlanEntity.prototype, "gender", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], ProductPlanEntity.prototype, "min_age", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], ProductPlanEntity.prototype, "max_age", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], ProductPlanEntity.prototype, "rider_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50 }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ProductPlanEntity.prototype, "plan_code", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
62
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
63
|
+
], ProductPlanEntity.prototype, "product", void 0);
|
|
64
|
+
exports.ProductPlanEntity = ProductPlanEntity = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "product_plans" })
|
|
66
|
+
], ProductPlanEntity);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { ProductEntity } from "./product.entity";
|
|
3
|
+
import { RiderEntity } from "./rider.entity";
|
|
4
|
+
export declare class ProductRiderEntity extends _BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
product_id: string;
|
|
7
|
+
rider_id: string;
|
|
8
|
+
is_default: boolean;
|
|
9
|
+
is_active: boolean;
|
|
10
|
+
product: ProductEntity;
|
|
11
|
+
rider: RiderEntity;
|
|
12
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.ProductRiderEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const rider_entity_1 = require("./rider.entity");
|
|
17
|
+
let ProductRiderEntity = class ProductRiderEntity extends _base_entity_1._BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.ProductRiderEntity = ProductRiderEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ProductRiderEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ProductRiderEntity.prototype, "product_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ProductRiderEntity.prototype, "rider_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], ProductRiderEntity.prototype, "is_default", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], ProductRiderEntity.prototype, "is_active", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
43
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
44
|
+
], ProductRiderEntity.prototype, "product", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => rider_entity_1.RiderEntity),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: "rider_id" }),
|
|
48
|
+
__metadata("design:type", rider_entity_1.RiderEntity)
|
|
49
|
+
], ProductRiderEntity.prototype, "rider", void 0);
|
|
50
|
+
exports.ProductRiderEntity = ProductRiderEntity = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "product_riders" }),
|
|
52
|
+
(0, typeorm_1.Index)("ux_product_riders_product_rider", ["product_id", "rider_id"], {
|
|
53
|
+
unique: true,
|
|
54
|
+
})
|
|
55
|
+
], ProductRiderEntity);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
+
import { ProductEntity } from "./product.entity";
|
|
3
|
+
import { TermEntity } from "./term.entity";
|
|
4
|
+
export declare class ProductTermEntity extends _BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
product_id: string;
|
|
7
|
+
term_id: number;
|
|
8
|
+
is_default: boolean;
|
|
9
|
+
is_active: boolean;
|
|
10
|
+
product: ProductEntity;
|
|
11
|
+
term: TermEntity;
|
|
12
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.ProductTermEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
const product_entity_1 = require("./product.entity");
|
|
16
|
+
const term_entity_1 = require("./term.entity");
|
|
17
|
+
let ProductTermEntity = class ProductTermEntity extends _base_entity_1._BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.ProductTermEntity = ProductTermEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid", { name: "id" }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ProductTermEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ProductTermEntity.prototype, "product_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "integer" }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ProductTermEntity.prototype, "term_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], ProductTermEntity.prototype, "is_default", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], ProductTermEntity.prototype, "is_active", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
43
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
44
|
+
], ProductTermEntity.prototype, "product", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => term_entity_1.TermEntity),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: "term_id" }),
|
|
48
|
+
__metadata("design:type", term_entity_1.TermEntity)
|
|
49
|
+
], ProductTermEntity.prototype, "term", void 0);
|
|
50
|
+
exports.ProductTermEntity = ProductTermEntity = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "product_terms" }),
|
|
52
|
+
(0, typeorm_1.Index)("ux_product_terms_product_term_id", ["product_id", "term_id"], {
|
|
53
|
+
unique: true,
|
|
54
|
+
})
|
|
55
|
+
], ProductTermEntity);
|
|
@@ -0,0 +1,40 @@
|
|
|
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.ProductTypeEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
+
let ProductTypeEntity = class ProductTypeEntity extends _base_entity_1._BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.ProductTypeEntity = ProductTypeEntity;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid", { name: "id" }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ProductTypeEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ProductTypeEntity.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], ProductTypeEntity.prototype, "name_kh", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], ProductTypeEntity.prototype, "description", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], ProductTypeEntity.prototype, "is_active", void 0);
|
|
38
|
+
exports.ProductTypeEntity = ProductTypeEntity = __decorate([
|
|
39
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "product_types" })
|
|
40
|
+
], ProductTypeEntity);
|
|
@@ -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: "terms" })
|
|
28
|
+
], TermEntity);
|