plac-micro-common 1.2.30 → 1.2.32
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_beneficiary.entity.d.ts +3 -3
- package/dist/models/application/app_beneficiary.entity.js +24 -24
- package/dist/models/application/app_coverage.entity.d.ts +3 -3
- package/dist/models/application/app_coverage.entity.js +25 -25
- package/dist/models/application/app_person.entity.d.ts +2 -2
- package/dist/models/application/app_person.entity.js +2 -2
- package/dist/models/application/app_underwriting_answer.entity.d.ts +7 -7
- package/dist/models/application/app_underwriting_answer.entity.js +25 -25
- package/dist/models/application/application.entity.d.ts +6 -6
- package/dist/models/application/application.entity.js +48 -48
- package/dist/models/application/index.d.ts +7 -7
- package/dist/models/application/index.js +11 -11
- package/dist/models/application/underwriting_question.entity.d.ts +1 -1
- package/dist/models/application/underwriting_question.entity.js +13 -13
- package/dist/models/core/index.d.ts +11 -11
- package/dist/models/core/index.js +19 -19
- package/dist/models/core/org_branch.entity.d.ts +3 -3
- package/dist/models/core/org_branch.entity.js +16 -16
- package/dist/models/core/org_channel.entity.d.ts +3 -3
- package/dist/models/core/org_channel.entity.js +17 -17
- package/dist/models/core/org_department.entity.d.ts +3 -3
- package/dist/models/core/org_department.entity.js +17 -17
- package/dist/models/core/org_position.entity.d.ts +5 -5
- package/dist/models/core/org_position.entity.js +19 -19
- package/dist/models/core/org_staff.entity.d.ts +5 -5
- package/dist/models/core/org_staff.entity.js +21 -21
- package/dist/models/core/org_staff_branches.entity.d.ts +5 -5
- package/dist/models/core/org_staff_branches.entity.js +18 -18
- package/dist/models/core/org_staff_reporting_lines.entity.d.ts +4 -4
- package/dist/models/core/org_staff_reporting_lines.entity.js +20 -20
- package/dist/models/core/organization.entity.d.ts +1 -1
- package/dist/models/core/organization.entity.js +12 -12
- package/dist/models/core/staffs.entity.d.ts +1 -1
- package/dist/models/core/staffs.entity.js +19 -19
- package/dist/types/permission.type.d.ts +3 -0
- package/dist/types/permission.type.js +3 -0
- package/package.json +1 -1
|
@@ -9,55 +9,55 @@ 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.OrganizationChannelEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
|
-
const organization_entity_1 = require("./organization.entity");
|
|
16
15
|
const types_1 = require("../../types");
|
|
17
|
-
|
|
16
|
+
const organization_entity_1 = require("./organization.entity");
|
|
17
|
+
let OrganizationChannelEntity = class OrganizationChannelEntity extends _base_entity_1._BaseEntity {
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.OrganizationChannelEntity = OrganizationChannelEntity;
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], OrganizationChannelEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
26
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], OrganizationChannelEntity.prototype, "org_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
|
-
],
|
|
32
|
+
], OrganizationChannelEntity.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, typeorm_1.Column)({ type: "varchar", length: 200 }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
36
|
+
], OrganizationChannelEntity.prototype, "name", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
|
-
],
|
|
40
|
+
], OrganizationChannelEntity.prototype, "name_kh", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.Index)(),
|
|
43
43
|
(0, typeorm_1.Column)({ type: "varchar", length: 30, default: types_1.ChannelType.Other }),
|
|
44
44
|
__metadata("design:type", String)
|
|
45
|
-
],
|
|
45
|
+
], OrganizationChannelEntity.prototype, "type", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, typeorm_1.Index)(),
|
|
48
48
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
49
49
|
__metadata("design:type", Object)
|
|
50
|
-
],
|
|
50
|
+
], OrganizationChannelEntity.prototype, "branch_id", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
53
53
|
__metadata("design:type", Boolean)
|
|
54
|
-
],
|
|
54
|
+
], OrganizationChannelEntity.prototype, "is_active", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
(0, typeorm_1.ManyToOne)(() => organization_entity_1.
|
|
56
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
57
57
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
58
|
-
__metadata("design:type", organization_entity_1.
|
|
59
|
-
],
|
|
60
|
-
exports.
|
|
58
|
+
__metadata("design:type", organization_entity_1.OrganizationEntity)
|
|
59
|
+
], OrganizationChannelEntity.prototype, "org", void 0);
|
|
60
|
+
exports.OrganizationChannelEntity = OrganizationChannelEntity = __decorate([
|
|
61
61
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_channels" }),
|
|
62
62
|
(0, typeorm_1.Unique)("uq_org_channel_code", ["org_id", "code"])
|
|
63
|
-
],
|
|
63
|
+
], OrganizationChannelEntity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import {
|
|
3
|
-
export declare class
|
|
2
|
+
import { OrganizationEntity } from "./organization.entity";
|
|
3
|
+
export declare class OrganizationDepartmentEntity extends _BaseEntity {
|
|
4
4
|
id: string;
|
|
5
5
|
org_id: string;
|
|
6
6
|
code: string;
|
|
@@ -10,5 +10,5 @@ export declare class OrganizationDepartment extends _BaseEntity {
|
|
|
10
10
|
parent_department_id?: string | null;
|
|
11
11
|
level?: number | null;
|
|
12
12
|
is_active: boolean;
|
|
13
|
-
org:
|
|
13
|
+
org: OrganizationEntity;
|
|
14
14
|
}
|
|
@@ -9,58 +9,58 @@ 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.OrganizationDepartmentEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const organization_entity_1 = require("./organization.entity");
|
|
16
|
-
let
|
|
16
|
+
let OrganizationDepartmentEntity = class OrganizationDepartmentEntity extends _base_entity_1._BaseEntity {
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
18
|
+
exports.OrganizationDepartmentEntity = OrganizationDepartmentEntity;
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
21
|
__metadata("design:type", String)
|
|
22
|
-
],
|
|
22
|
+
], OrganizationDepartmentEntity.prototype, "id", void 0);
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.Index)(),
|
|
25
25
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
|
-
],
|
|
27
|
+
], OrganizationDepartmentEntity.prototype, "org_id", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
|
-
],
|
|
31
|
+
], OrganizationDepartmentEntity.prototype, "code", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
(0, typeorm_1.Column)({ type: "varchar", length: 200 }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
|
-
],
|
|
35
|
+
], OrganizationDepartmentEntity.prototype, "name", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
39
|
+
], OrganizationDepartmentEntity.prototype, "name_kh", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, typeorm_1.Index)(),
|
|
42
42
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
43
43
|
__metadata("design:type", Object)
|
|
44
|
-
],
|
|
44
|
+
], OrganizationDepartmentEntity.prototype, "branch_id", void 0);
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, typeorm_1.Index)(),
|
|
47
47
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
48
48
|
__metadata("design:type", Object)
|
|
49
|
-
],
|
|
49
|
+
], OrganizationDepartmentEntity.prototype, "parent_department_id", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
52
52
|
__metadata("design:type", Object)
|
|
53
|
-
],
|
|
53
|
+
], OrganizationDepartmentEntity.prototype, "level", void 0);
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
56
56
|
__metadata("design:type", Boolean)
|
|
57
|
-
],
|
|
57
|
+
], OrganizationDepartmentEntity.prototype, "is_active", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
(0, typeorm_1.ManyToOne)(() => organization_entity_1.
|
|
59
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
60
60
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
61
|
-
__metadata("design:type", organization_entity_1.
|
|
62
|
-
],
|
|
63
|
-
exports.
|
|
61
|
+
__metadata("design:type", organization_entity_1.OrganizationEntity)
|
|
62
|
+
], OrganizationDepartmentEntity.prototype, "org", void 0);
|
|
63
|
+
exports.OrganizationDepartmentEntity = OrganizationDepartmentEntity = __decorate([
|
|
64
64
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_departments" }),
|
|
65
65
|
(0, typeorm_1.Unique)("uq_org_department_code", ["org_id", "code"])
|
|
66
|
-
],
|
|
66
|
+
], OrganizationDepartmentEntity);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
2
|
+
import { OrganizationEntity } from "./organization.entity";
|
|
3
|
+
import { OrganizationDepartmentEntity } from "./org_department.entity";
|
|
4
|
+
export declare class OrganizationPositionEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
org_id: string;
|
|
7
7
|
code: string;
|
|
@@ -11,6 +11,6 @@ export declare class OrganizationPosition extends _BaseEntity {
|
|
|
11
11
|
department_id?: string | null;
|
|
12
12
|
level?: number | null;
|
|
13
13
|
is_active: boolean;
|
|
14
|
-
org:
|
|
15
|
-
department?:
|
|
14
|
+
org: OrganizationEntity;
|
|
15
|
+
department?: OrganizationDepartmentEntity | null;
|
|
16
16
|
}
|
|
@@ -9,64 +9,64 @@ 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.OrganizationPositionEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const organization_entity_1 = require("./organization.entity");
|
|
16
16
|
const org_department_entity_1 = require("./org_department.entity");
|
|
17
|
-
let
|
|
17
|
+
let OrganizationPositionEntity = class OrganizationPositionEntity extends _base_entity_1._BaseEntity {
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.OrganizationPositionEntity = OrganizationPositionEntity;
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], OrganizationPositionEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
26
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], OrganizationPositionEntity.prototype, "org_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
|
-
],
|
|
32
|
+
], OrganizationPositionEntity.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, typeorm_1.Column)({ type: "varchar", length: 200 }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
36
|
+
], OrganizationPositionEntity.prototype, "name", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
|
-
],
|
|
40
|
+
], OrganizationPositionEntity.prototype, "name_kh", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.Index)(),
|
|
43
43
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
44
44
|
__metadata("design:type", Object)
|
|
45
|
-
],
|
|
45
|
+
], OrganizationPositionEntity.prototype, "parent_position_id", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, typeorm_1.Index)(),
|
|
48
48
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
49
49
|
__metadata("design:type", Object)
|
|
50
|
-
],
|
|
50
|
+
], OrganizationPositionEntity.prototype, "department_id", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
53
53
|
__metadata("design:type", Object)
|
|
54
|
-
],
|
|
54
|
+
], OrganizationPositionEntity.prototype, "level", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
57
57
|
__metadata("design:type", Boolean)
|
|
58
|
-
],
|
|
58
|
+
], OrganizationPositionEntity.prototype, "is_active", void 0);
|
|
59
59
|
__decorate([
|
|
60
|
-
(0, typeorm_1.ManyToOne)(() => organization_entity_1.
|
|
60
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
61
61
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
62
|
-
__metadata("design:type", organization_entity_1.
|
|
63
|
-
],
|
|
62
|
+
__metadata("design:type", organization_entity_1.OrganizationEntity)
|
|
63
|
+
], OrganizationPositionEntity.prototype, "org", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
(0, typeorm_1.ManyToOne)(() => org_department_entity_1.
|
|
65
|
+
(0, typeorm_1.ManyToOne)(() => org_department_entity_1.OrganizationDepartmentEntity, { onDelete: "SET NULL" }),
|
|
66
66
|
(0, typeorm_1.JoinColumn)({ name: "department_id" }),
|
|
67
67
|
__metadata("design:type", Object)
|
|
68
|
-
],
|
|
69
|
-
exports.
|
|
68
|
+
], OrganizationPositionEntity.prototype, "department", void 0);
|
|
69
|
+
exports.OrganizationPositionEntity = OrganizationPositionEntity = __decorate([
|
|
70
70
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_positions" }),
|
|
71
71
|
(0, typeorm_1.Unique)("uq_org_position_code", ["org_id", "code"])
|
|
72
|
-
],
|
|
72
|
+
], OrganizationPositionEntity);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import { Organization } from "./organization.entity";
|
|
3
|
-
import { Staff } from "./staffs.entity";
|
|
4
2
|
import { StaffStatus, StaffType } from "../../types";
|
|
5
|
-
|
|
3
|
+
import { OrganizationEntity } from "./organization.entity";
|
|
4
|
+
import { StaffEntity } from "./staffs.entity";
|
|
5
|
+
export declare class OrganizationStaffEntity extends _BaseEntity {
|
|
6
6
|
id: string;
|
|
7
7
|
org_id: string;
|
|
8
8
|
staff_id: string;
|
|
@@ -12,6 +12,6 @@ export declare class OrganizationStaff extends _BaseEntity {
|
|
|
12
12
|
join_date?: string | null;
|
|
13
13
|
end_date?: string | null;
|
|
14
14
|
is_active: boolean;
|
|
15
|
-
org:
|
|
16
|
-
staff:
|
|
15
|
+
org: OrganizationEntity;
|
|
16
|
+
staff: StaffEntity;
|
|
17
17
|
}
|
|
@@ -9,68 +9,68 @@ 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.OrganizationStaffEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
|
+
const types_1 = require("../../types");
|
|
15
16
|
const organization_entity_1 = require("./organization.entity");
|
|
16
17
|
const staffs_entity_1 = require("./staffs.entity");
|
|
17
|
-
|
|
18
|
-
let OrganizationStaff = class OrganizationStaff extends _base_entity_1._BaseEntity {
|
|
18
|
+
let OrganizationStaffEntity = class OrganizationStaffEntity extends _base_entity_1._BaseEntity {
|
|
19
19
|
};
|
|
20
|
-
exports.
|
|
20
|
+
exports.OrganizationStaffEntity = OrganizationStaffEntity;
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
|
-
],
|
|
24
|
+
], OrganizationStaffEntity.prototype, "id", void 0);
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, typeorm_1.Index)(),
|
|
27
27
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
|
-
],
|
|
29
|
+
], OrganizationStaffEntity.prototype, "org_id", void 0);
|
|
30
30
|
__decorate([
|
|
31
31
|
(0, typeorm_1.Index)(),
|
|
32
32
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
33
33
|
__metadata("design:type", String)
|
|
34
|
-
],
|
|
34
|
+
], OrganizationStaffEntity.prototype, "staff_id", void 0);
|
|
35
35
|
__decorate([
|
|
36
36
|
(0, typeorm_1.Index)(),
|
|
37
37
|
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
39
|
+
], OrganizationStaffEntity.prototype, "staff_code", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, typeorm_1.Index)(),
|
|
42
42
|
(0, typeorm_1.Column)({ type: "varchar", length: 20, default: types_1.StaffType.Employee }),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
|
-
],
|
|
44
|
+
], OrganizationStaffEntity.prototype, "staff_type", void 0);
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, typeorm_1.Index)(),
|
|
47
47
|
(0, typeorm_1.Column)({ type: "varchar", length: 20, default: types_1.StaffStatus.Active }),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
|
-
],
|
|
49
|
+
], OrganizationStaffEntity.prototype, "status", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
52
52
|
__metadata("design:type", Object)
|
|
53
|
-
],
|
|
53
|
+
], OrganizationStaffEntity.prototype, "join_date", void 0);
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
56
56
|
__metadata("design:type", Object)
|
|
57
|
-
],
|
|
57
|
+
], OrganizationStaffEntity.prototype, "end_date", void 0);
|
|
58
58
|
__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
62
|
__decorate([
|
|
63
|
-
(0, typeorm_1.ManyToOne)(() => organization_entity_1.
|
|
63
|
+
(0, typeorm_1.ManyToOne)(() => organization_entity_1.OrganizationEntity, { onDelete: "CASCADE" }),
|
|
64
64
|
(0, typeorm_1.JoinColumn)({ name: "org_id" }),
|
|
65
|
-
__metadata("design:type", organization_entity_1.
|
|
66
|
-
],
|
|
65
|
+
__metadata("design:type", organization_entity_1.OrganizationEntity)
|
|
66
|
+
], OrganizationStaffEntity.prototype, "org", void 0);
|
|
67
67
|
__decorate([
|
|
68
|
-
(0, typeorm_1.ManyToOne)(() => staffs_entity_1.
|
|
68
|
+
(0, typeorm_1.ManyToOne)(() => staffs_entity_1.StaffEntity, { onDelete: "RESTRICT" }),
|
|
69
69
|
(0, typeorm_1.JoinColumn)({ name: "staff_id" }),
|
|
70
|
-
__metadata("design:type", staffs_entity_1.
|
|
71
|
-
],
|
|
72
|
-
exports.
|
|
70
|
+
__metadata("design:type", staffs_entity_1.StaffEntity)
|
|
71
|
+
], OrganizationStaffEntity.prototype, "staff", void 0);
|
|
72
|
+
exports.OrganizationStaffEntity = OrganizationStaffEntity = __decorate([
|
|
73
73
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_staffs" }),
|
|
74
74
|
(0, typeorm_1.Unique)("uq_org_staff_staff_code", ["org_id", "staff_code"]),
|
|
75
75
|
(0, typeorm_1.Unique)("uq_org_staff_org_staff", ["org_id", "staff_id"])
|
|
76
|
-
],
|
|
76
|
+
], OrganizationStaffEntity);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
2
|
+
import { OrganizationStaffEntity } from "./org_staff.entity";
|
|
3
|
+
import { OrganizationBranchEntity } from "./org_branch.entity";
|
|
4
|
+
export declare class OrganizationStaffBranchEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
org_staff_id: string;
|
|
7
7
|
branch_id: string;
|
|
@@ -9,6 +9,6 @@ export declare class OrganizationStaffBranch extends _BaseEntity {
|
|
|
9
9
|
effective_from?: string | null;
|
|
10
10
|
effective_to?: string | null;
|
|
11
11
|
is_active: boolean;
|
|
12
|
-
org_staff:
|
|
13
|
-
branch:
|
|
12
|
+
org_staff: OrganizationStaffEntity;
|
|
13
|
+
branch: OrganizationBranchEntity;
|
|
14
14
|
}
|
|
@@ -9,55 +9,55 @@ 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.OrganizationStaffBranchEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
15
|
const org_staff_entity_1 = require("./org_staff.entity");
|
|
16
16
|
const org_branch_entity_1 = require("./org_branch.entity");
|
|
17
|
-
let
|
|
17
|
+
let OrganizationStaffBranchEntity = class OrganizationStaffBranchEntity extends _base_entity_1._BaseEntity {
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.OrganizationStaffBranchEntity = OrganizationStaffBranchEntity;
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], OrganizationStaffBranchEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
26
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], OrganizationStaffBranchEntity.prototype, "org_staff_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Index)(),
|
|
31
31
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
33
|
+
], OrganizationStaffBranchEntity.prototype, "branch_id", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
36
36
|
__metadata("design:type", Boolean)
|
|
37
|
-
],
|
|
37
|
+
], OrganizationStaffBranchEntity.prototype, "is_primary", void 0);
|
|
38
38
|
__decorate([
|
|
39
39
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
40
40
|
__metadata("design:type", Object)
|
|
41
|
-
],
|
|
41
|
+
], OrganizationStaffBranchEntity.prototype, "effective_from", void 0);
|
|
42
42
|
__decorate([
|
|
43
43
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
44
44
|
__metadata("design:type", Object)
|
|
45
|
-
],
|
|
45
|
+
], OrganizationStaffBranchEntity.prototype, "effective_to", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
48
48
|
__metadata("design:type", Boolean)
|
|
49
|
-
],
|
|
49
|
+
], OrganizationStaffBranchEntity.prototype, "is_active", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaffEntity, { onDelete: "CASCADE" }),
|
|
52
52
|
(0, typeorm_1.JoinColumn)({ name: "org_staff_id" }),
|
|
53
|
-
__metadata("design:type", org_staff_entity_1.
|
|
54
|
-
],
|
|
53
|
+
__metadata("design:type", org_staff_entity_1.OrganizationStaffEntity)
|
|
54
|
+
], OrganizationStaffBranchEntity.prototype, "org_staff", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
(0, typeorm_1.ManyToOne)(() => org_branch_entity_1.
|
|
56
|
+
(0, typeorm_1.ManyToOne)(() => org_branch_entity_1.OrganizationBranchEntity, { onDelete: "RESTRICT" }),
|
|
57
57
|
(0, typeorm_1.JoinColumn)({ name: "branch_id" }),
|
|
58
|
-
__metadata("design:type", org_branch_entity_1.
|
|
59
|
-
],
|
|
60
|
-
exports.
|
|
58
|
+
__metadata("design:type", org_branch_entity_1.OrganizationBranchEntity)
|
|
59
|
+
], OrganizationStaffBranchEntity.prototype, "branch", void 0);
|
|
60
|
+
exports.OrganizationStaffBranchEntity = OrganizationStaffBranchEntity = __decorate([
|
|
61
61
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_staff_branches" }),
|
|
62
62
|
(0, typeorm_1.Unique)("uq_org_staff_branch", ["org_staff_id", "branch_id"])
|
|
63
|
-
],
|
|
63
|
+
], OrganizationStaffBranchEntity);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import { OrganizationStaff } from "./org_staff.entity";
|
|
3
2
|
import { ReportingLineType } from "../../types";
|
|
4
|
-
|
|
3
|
+
import { OrganizationStaffEntity } from "./org_staff.entity";
|
|
4
|
+
export declare class OrganizationStaffReportingLineEntity extends _BaseEntity {
|
|
5
5
|
id: string;
|
|
6
6
|
org_staff_id: string;
|
|
7
7
|
manager_org_staff_id: string;
|
|
@@ -10,6 +10,6 @@ export declare class OrganizationStaffReportingLine extends _BaseEntity {
|
|
|
10
10
|
effective_from?: string | null;
|
|
11
11
|
effective_to?: string | null;
|
|
12
12
|
is_primary: boolean;
|
|
13
|
-
org_staff:
|
|
14
|
-
manager_org_staff:
|
|
13
|
+
org_staff: OrganizationStaffEntity;
|
|
14
|
+
manager_org_staff: OrganizationStaffEntity;
|
|
15
15
|
}
|
|
@@ -9,28 +9,28 @@ 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.OrganizationStaffReportingLineEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const _base_entity_1 = require("../_base_entity");
|
|
15
|
-
const org_staff_entity_1 = require("./org_staff.entity");
|
|
16
15
|
const types_1 = require("../../types");
|
|
17
|
-
|
|
16
|
+
const org_staff_entity_1 = require("./org_staff.entity");
|
|
17
|
+
let OrganizationStaffReportingLineEntity = class OrganizationStaffReportingLineEntity extends _base_entity_1._BaseEntity {
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.OrganizationStaffReportingLineEntity = OrganizationStaffReportingLineEntity;
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], OrganizationStaffReportingLineEntity.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typeorm_1.Index)(),
|
|
26
26
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], OrganizationStaffReportingLineEntity.prototype, "org_staff_id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.Index)(),
|
|
31
31
|
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
33
|
+
], OrganizationStaffReportingLineEntity.prototype, "manager_org_staff_id", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, typeorm_1.Index)(),
|
|
36
36
|
(0, typeorm_1.Column)({
|
|
@@ -39,34 +39,34 @@ __decorate([
|
|
|
39
39
|
default: types_1.ReportingLineType.Solid,
|
|
40
40
|
}),
|
|
41
41
|
__metadata("design:type", String)
|
|
42
|
-
],
|
|
42
|
+
], OrganizationStaffReportingLineEntity.prototype, "line_type", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
45
45
|
__metadata("design:type", Boolean)
|
|
46
|
-
],
|
|
46
|
+
], OrganizationStaffReportingLineEntity.prototype, "is_active", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
49
49
|
__metadata("design:type", Object)
|
|
50
|
-
],
|
|
50
|
+
], OrganizationStaffReportingLineEntity.prototype, "effective_from", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, typeorm_1.Column)({ type: "date", nullable: true }),
|
|
53
53
|
__metadata("design:type", Object)
|
|
54
|
-
],
|
|
54
|
+
], OrganizationStaffReportingLineEntity.prototype, "effective_to", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
57
57
|
__metadata("design:type", Boolean)
|
|
58
|
-
],
|
|
58
|
+
], OrganizationStaffReportingLineEntity.prototype, "is_primary", void 0);
|
|
59
59
|
__decorate([
|
|
60
|
-
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.
|
|
60
|
+
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaffEntity, { onDelete: "CASCADE" }),
|
|
61
61
|
(0, typeorm_1.JoinColumn)({ name: "org_staff_id" }),
|
|
62
|
-
__metadata("design:type", org_staff_entity_1.
|
|
63
|
-
],
|
|
62
|
+
__metadata("design:type", org_staff_entity_1.OrganizationStaffEntity)
|
|
63
|
+
], OrganizationStaffReportingLineEntity.prototype, "org_staff", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.
|
|
65
|
+
(0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
|
|
66
66
|
(0, typeorm_1.JoinColumn)({ name: "manager_org_staff_id" }),
|
|
67
|
-
__metadata("design:type", org_staff_entity_1.
|
|
68
|
-
],
|
|
69
|
-
exports.
|
|
67
|
+
__metadata("design:type", org_staff_entity_1.OrganizationStaffEntity)
|
|
68
|
+
], OrganizationStaffReportingLineEntity.prototype, "manager_org_staff", void 0);
|
|
69
|
+
exports.OrganizationStaffReportingLineEntity = OrganizationStaffReportingLineEntity = __decorate([
|
|
70
70
|
(0, typeorm_1.Entity)({ schema: "core", name: "org_staff_reporting_lines" }),
|
|
71
71
|
(0, typeorm_1.Unique)("uq_org_staff_reporting_line", [
|
|
72
72
|
"org_staff_id",
|
|
@@ -74,4 +74,4 @@ exports.OrganizationStaffReportingLine = OrganizationStaffReportingLine = __deco
|
|
|
74
74
|
"line_type",
|
|
75
75
|
]),
|
|
76
76
|
(0, typeorm_1.Check)(`"org_staff_id" <> "manager_org_staff_id"`)
|
|
77
|
-
],
|
|
77
|
+
], OrganizationStaffReportingLineEntity);
|