plac-micro-common 1.3.112 → 1.3.114
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/application.entity.d.ts +4 -1
- package/dist/models/application/application.entity.js +18 -0
- package/dist/models/core/product/promotion.entity.d.ts +0 -3
- package/dist/models/core/product/promotion.entity.js +0 -9
- package/dist/models/core/product/promotion_product.entity.d.ts +2 -0
- package/dist/models/core/product/promotion_product.entity.js +8 -0
- package/dist/models/core/source_code.entity.d.ts +5 -0
- package/dist/models/core/source_code.entity.js +16 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
2
|
import { AppFormType, ApplicationStatus, AppPhLaRelation, AppSourceType, UWDecisionMetadata, UWDecisionType } from "../../types";
|
|
3
|
-
import { OrganizationBranchEntity, OrganizationEntity, OrganizationStaffEntity, OrgReferralEntity } from "../core";
|
|
3
|
+
import { OrganizationBranchEntity, OrganizationEntity, OrganizationStaffEntity, OrgReferralEntity, SourceCodeEntity, SourceSubTypeEntity, SourceTypeEntity } from "../core";
|
|
4
4
|
import { AppCoverageEntity } from "./app_coverage.entity";
|
|
5
5
|
import { AppPersonEntity } from "./app_person.entity";
|
|
6
6
|
import { AppBeneficiaryEntity } from "./app_beneficiary.entity";
|
|
@@ -66,6 +66,9 @@ export declare class ApplicationEntity extends _BaseEntity {
|
|
|
66
66
|
is_migrated: boolean;
|
|
67
67
|
metadata?: Record<string, any> | null;
|
|
68
68
|
org: OrganizationEntity;
|
|
69
|
+
source_type_ref?: SourceTypeEntity | null;
|
|
70
|
+
source_sub_type?: SourceSubTypeEntity | null;
|
|
71
|
+
source_code?: SourceCodeEntity | null;
|
|
69
72
|
owner_org_staff: OrganizationStaffEntity;
|
|
70
73
|
assigned_org_staff?: OrganizationStaffEntity | null;
|
|
71
74
|
org_branch?: OrganizationBranchEntity | null;
|
|
@@ -319,6 +319,24 @@ __decorate([
|
|
|
319
319
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
320
320
|
__metadata("design:type", core_1.OrganizationEntity)
|
|
321
321
|
], ApplicationEntity.prototype, "org", void 0);
|
|
322
|
+
__decorate([
|
|
323
|
+
(0, typeorm_1.ManyToOne)(() => core_1.SourceTypeEntity, { nullable: true, onDelete: "SET NULL" }),
|
|
324
|
+
(0, typeorm_1.JoinColumn)({ name: "source_type_id" }),
|
|
325
|
+
__metadata("design:type", Object)
|
|
326
|
+
], ApplicationEntity.prototype, "source_type_ref", void 0);
|
|
327
|
+
__decorate([
|
|
328
|
+
(0, typeorm_1.ManyToOne)(() => core_1.SourceSubTypeEntity, {
|
|
329
|
+
nullable: true,
|
|
330
|
+
onDelete: "SET NULL",
|
|
331
|
+
}),
|
|
332
|
+
(0, typeorm_1.JoinColumn)({ name: "source_sub_type_id" }),
|
|
333
|
+
__metadata("design:type", Object)
|
|
334
|
+
], ApplicationEntity.prototype, "source_sub_type", void 0);
|
|
335
|
+
__decorate([
|
|
336
|
+
(0, typeorm_1.ManyToOne)(() => core_1.SourceCodeEntity, { nullable: true, onDelete: "SET NULL" }),
|
|
337
|
+
(0, typeorm_1.JoinColumn)({ name: "source_code_id" }),
|
|
338
|
+
__metadata("design:type", Object)
|
|
339
|
+
], ApplicationEntity.prototype, "source_code", void 0);
|
|
322
340
|
__decorate([
|
|
323
341
|
(0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
|
|
324
342
|
(0, typeorm_1.JoinColumn)({ name: "owner_org_staff_id" }),
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
-
import { DiscountType } from "../../../types";
|
|
3
2
|
export declare class PromotionEntity extends _BaseEntity {
|
|
4
3
|
id: string;
|
|
5
4
|
promotion_code: string;
|
|
6
5
|
name: string;
|
|
7
6
|
name_kh?: string | null;
|
|
8
|
-
discount_type: DiscountType;
|
|
9
|
-
discount_value: number;
|
|
10
7
|
is_active: boolean;
|
|
11
8
|
starts_at?: Date | null;
|
|
12
9
|
ends_at?: Date | null;
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PromotionEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../../_base_entity");
|
|
15
|
-
const types_1 = require("../../../types");
|
|
16
15
|
let PromotionEntity = class PromotionEntity extends _base_entity_1._BaseEntity {
|
|
17
16
|
};
|
|
18
17
|
exports.PromotionEntity = PromotionEntity;
|
|
@@ -32,14 +31,6 @@ __decorate([
|
|
|
32
31
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
33
32
|
__metadata("design:type", Object)
|
|
34
33
|
], 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
34
|
__decorate([
|
|
44
35
|
(0, typeorm_1.Column)({ type: "bool", default: true }),
|
|
45
36
|
__metadata("design:type", Boolean)
|
|
@@ -4,9 +4,11 @@ export declare class PromotionProductEntity extends _BaseEntity {
|
|
|
4
4
|
id: string;
|
|
5
5
|
promotion_id: string;
|
|
6
6
|
product_id: string;
|
|
7
|
+
rider_id?: string | null;
|
|
7
8
|
term_year?: number | null;
|
|
8
9
|
payment_mode_id?: string | null;
|
|
9
10
|
discount_type?: DiscountType;
|
|
10
11
|
discount_value?: number | null;
|
|
12
|
+
configuration?: Record<string, any> | null;
|
|
11
13
|
is_active: boolean;
|
|
12
14
|
}
|
|
@@ -29,6 +29,10 @@ __decorate([
|
|
|
29
29
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], PromotionProductEntity.prototype, "product_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], PromotionProductEntity.prototype, "rider_id", void 0);
|
|
32
36
|
__decorate([
|
|
33
37
|
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
34
38
|
__metadata("design:type", Object)
|
|
@@ -51,6 +55,10 @@ __decorate([
|
|
|
51
55
|
(0, typeorm_1.Column)({ type: "numeric", precision: 18, scale: 2, nullable: true }),
|
|
52
56
|
__metadata("design:type", Object)
|
|
53
57
|
], PromotionProductEntity.prototype, "discount_value", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], PromotionProductEntity.prototype, "configuration", void 0);
|
|
54
62
|
__decorate([
|
|
55
63
|
(0, typeorm_1.Column)({ default: true }),
|
|
56
64
|
__metadata("design:type", Boolean)
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { _BaseGeneralEntity } from "../_base_general_entity";
|
|
2
2
|
import { SourceSubTypeEntity } from "./source_sub_type.entity";
|
|
3
3
|
import { SourceTypeEntity } from "./source_type.entity";
|
|
4
|
+
import { OrganizationEntity } from "./organization.entity";
|
|
5
|
+
import { OrganizationStaffEntity } from "./org_staff.entity";
|
|
4
6
|
export declare class SourceCodeEntity extends _BaseGeneralEntity {
|
|
5
7
|
code: string;
|
|
6
8
|
source_type_id: string;
|
|
7
9
|
source_sub_type_id?: string | null;
|
|
8
10
|
org_id?: string | null;
|
|
11
|
+
org_staff_id?: string | null;
|
|
9
12
|
source_type: SourceTypeEntity;
|
|
10
13
|
source_sub_type?: SourceSubTypeEntity | null;
|
|
14
|
+
org?: OrganizationEntity | null;
|
|
15
|
+
org_staff?: OrganizationStaffEntity | null;
|
|
11
16
|
}
|
|
@@ -14,6 +14,8 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const _base_general_entity_1 = require("../_base_general_entity");
|
|
15
15
|
const source_sub_type_entity_1 = require("./source_sub_type.entity");
|
|
16
16
|
const source_type_entity_1 = require("./source_type.entity");
|
|
17
|
+
const organization_entity_1 = require("./organization.entity");
|
|
18
|
+
const org_staff_entity_1 = require("./org_staff.entity");
|
|
17
19
|
let SourceCodeEntity = class SourceCodeEntity extends _base_general_entity_1._BaseGeneralEntity {
|
|
18
20
|
};
|
|
19
21
|
exports.SourceCodeEntity = SourceCodeEntity;
|
|
@@ -33,6 +35,10 @@ __decorate([
|
|
|
33
35
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
34
36
|
__metadata("design:type", Object)
|
|
35
37
|
], SourceCodeEntity.prototype, "org_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], SourceCodeEntity.prototype, "org_staff_id", void 0);
|
|
36
42
|
__decorate([
|
|
37
43
|
(0, typeorm_1.ManyToOne)(() => source_type_entity_1.SourceTypeEntity, { onDelete: "RESTRICT" }),
|
|
38
44
|
(0, typeorm_1.JoinColumn)({ name: "source_type_id" }),
|
|
@@ -43,6 +49,16 @@ __decorate([
|
|
|
43
49
|
(0, typeorm_1.JoinColumn)({ name: "source_sub_type_id" }),
|
|
44
50
|
__metadata("design:type", Object)
|
|
45
51
|
], SourceCodeEntity.prototype, "source_sub_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "RESTRICT" }),
|
|
54
|
+
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], SourceCodeEntity.prototype, "org", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
|
|
59
|
+
(0, typeorm_1.JoinColumn)({ name: "org_staff_id" }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], SourceCodeEntity.prototype, "org_staff", void 0);
|
|
46
62
|
exports.SourceCodeEntity = SourceCodeEntity = __decorate([
|
|
47
63
|
(0, typeorm_1.Entity)({ name: "source_codes", schema: "core" })
|
|
48
64
|
], SourceCodeEntity);
|