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.
Files changed (37) hide show
  1. package/dist/models/application/app_beneficiary.entity.d.ts +3 -3
  2. package/dist/models/application/app_beneficiary.entity.js +24 -24
  3. package/dist/models/application/app_coverage.entity.d.ts +3 -3
  4. package/dist/models/application/app_coverage.entity.js +25 -25
  5. package/dist/models/application/app_person.entity.d.ts +2 -2
  6. package/dist/models/application/app_person.entity.js +2 -2
  7. package/dist/models/application/app_underwriting_answer.entity.d.ts +7 -7
  8. package/dist/models/application/app_underwriting_answer.entity.js +25 -25
  9. package/dist/models/application/application.entity.d.ts +6 -6
  10. package/dist/models/application/application.entity.js +48 -48
  11. package/dist/models/application/index.d.ts +7 -7
  12. package/dist/models/application/index.js +11 -11
  13. package/dist/models/application/underwriting_question.entity.d.ts +1 -1
  14. package/dist/models/application/underwriting_question.entity.js +13 -13
  15. package/dist/models/core/index.d.ts +11 -11
  16. package/dist/models/core/index.js +19 -19
  17. package/dist/models/core/org_branch.entity.d.ts +3 -3
  18. package/dist/models/core/org_branch.entity.js +16 -16
  19. package/dist/models/core/org_channel.entity.d.ts +3 -3
  20. package/dist/models/core/org_channel.entity.js +17 -17
  21. package/dist/models/core/org_department.entity.d.ts +3 -3
  22. package/dist/models/core/org_department.entity.js +17 -17
  23. package/dist/models/core/org_position.entity.d.ts +5 -5
  24. package/dist/models/core/org_position.entity.js +19 -19
  25. package/dist/models/core/org_staff.entity.d.ts +5 -5
  26. package/dist/models/core/org_staff.entity.js +21 -21
  27. package/dist/models/core/org_staff_branches.entity.d.ts +5 -5
  28. package/dist/models/core/org_staff_branches.entity.js +18 -18
  29. package/dist/models/core/org_staff_reporting_lines.entity.d.ts +4 -4
  30. package/dist/models/core/org_staff_reporting_lines.entity.js +20 -20
  31. package/dist/models/core/organization.entity.d.ts +1 -1
  32. package/dist/models/core/organization.entity.js +12 -12
  33. package/dist/models/core/staffs.entity.d.ts +1 -1
  34. package/dist/models/core/staffs.entity.js +19 -19
  35. package/dist/types/permission.type.d.ts +3 -0
  36. package/dist/types/permission.type.js +3 -0
  37. 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.OrganizationChannel = void 0;
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
- let OrganizationChannel = class OrganizationChannel extends _base_entity_1._BaseEntity {
16
+ const organization_entity_1 = require("./organization.entity");
17
+ let OrganizationChannelEntity = class OrganizationChannelEntity extends _base_entity_1._BaseEntity {
18
18
  };
19
- exports.OrganizationChannel = OrganizationChannel;
19
+ exports.OrganizationChannelEntity = OrganizationChannelEntity;
20
20
  __decorate([
21
21
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
22
  __metadata("design:type", String)
23
- ], OrganizationChannel.prototype, "id", void 0);
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
- ], OrganizationChannel.prototype, "org_id", void 0);
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
- ], OrganizationChannel.prototype, "code", void 0);
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
- ], OrganizationChannel.prototype, "name", void 0);
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
- ], OrganizationChannel.prototype, "name_kh", void 0);
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
- ], OrganizationChannel.prototype, "type", void 0);
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
- ], OrganizationChannel.prototype, "branch_id", void 0);
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
- ], OrganizationChannel.prototype, "is_active", void 0);
54
+ ], OrganizationChannelEntity.prototype, "is_active", void 0);
55
55
  __decorate([
56
- (0, typeorm_1.ManyToOne)(() => organization_entity_1.Organization, { onDelete: "CASCADE" }),
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.Organization)
59
- ], OrganizationChannel.prototype, "org", void 0);
60
- exports.OrganizationChannel = OrganizationChannel = __decorate([
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
- ], OrganizationChannel);
63
+ ], OrganizationChannelEntity);
@@ -1,6 +1,6 @@
1
1
  import { _BaseEntity } from "../_base_entity";
2
- import { Organization } from "./organization.entity";
3
- export declare class OrganizationDepartment extends _BaseEntity {
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: Organization;
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.OrganizationDepartment = void 0;
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 OrganizationDepartment = class OrganizationDepartment extends _base_entity_1._BaseEntity {
16
+ let OrganizationDepartmentEntity = class OrganizationDepartmentEntity extends _base_entity_1._BaseEntity {
17
17
  };
18
- exports.OrganizationDepartment = OrganizationDepartment;
18
+ exports.OrganizationDepartmentEntity = OrganizationDepartmentEntity;
19
19
  __decorate([
20
20
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
21
21
  __metadata("design:type", String)
22
- ], OrganizationDepartment.prototype, "id", void 0);
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
- ], OrganizationDepartment.prototype, "org_id", void 0);
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
- ], OrganizationDepartment.prototype, "code", void 0);
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
- ], OrganizationDepartment.prototype, "name", void 0);
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
- ], OrganizationDepartment.prototype, "name_kh", void 0);
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
- ], OrganizationDepartment.prototype, "branch_id", void 0);
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
- ], OrganizationDepartment.prototype, "parent_department_id", void 0);
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
- ], OrganizationDepartment.prototype, "level", void 0);
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
- ], OrganizationDepartment.prototype, "is_active", void 0);
57
+ ], OrganizationDepartmentEntity.prototype, "is_active", void 0);
58
58
  __decorate([
59
- (0, typeorm_1.ManyToOne)(() => organization_entity_1.Organization, { onDelete: "CASCADE" }),
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.Organization)
62
- ], OrganizationDepartment.prototype, "org", void 0);
63
- exports.OrganizationDepartment = OrganizationDepartment = __decorate([
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
- ], OrganizationDepartment);
66
+ ], OrganizationDepartmentEntity);
@@ -1,7 +1,7 @@
1
1
  import { _BaseEntity } from "../_base_entity";
2
- import { Organization } from "./organization.entity";
3
- import { OrganizationDepartment } from "./org_department.entity";
4
- export declare class OrganizationPosition extends _BaseEntity {
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: Organization;
15
- department?: OrganizationDepartment | null;
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.OrganizationPosition = void 0;
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 OrganizationPosition = class OrganizationPosition extends _base_entity_1._BaseEntity {
17
+ let OrganizationPositionEntity = class OrganizationPositionEntity extends _base_entity_1._BaseEntity {
18
18
  };
19
- exports.OrganizationPosition = OrganizationPosition;
19
+ exports.OrganizationPositionEntity = OrganizationPositionEntity;
20
20
  __decorate([
21
21
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
22
  __metadata("design:type", String)
23
- ], OrganizationPosition.prototype, "id", void 0);
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
- ], OrganizationPosition.prototype, "org_id", void 0);
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
- ], OrganizationPosition.prototype, "code", void 0);
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
- ], OrganizationPosition.prototype, "name", void 0);
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
- ], OrganizationPosition.prototype, "name_kh", void 0);
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
- ], OrganizationPosition.prototype, "parent_position_id", void 0);
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
- ], OrganizationPosition.prototype, "department_id", void 0);
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
- ], OrganizationPosition.prototype, "level", void 0);
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
- ], OrganizationPosition.prototype, "is_active", void 0);
58
+ ], OrganizationPositionEntity.prototype, "is_active", void 0);
59
59
  __decorate([
60
- (0, typeorm_1.ManyToOne)(() => organization_entity_1.Organization, { onDelete: "CASCADE" }),
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.Organization)
63
- ], OrganizationPosition.prototype, "org", void 0);
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.OrganizationDepartment, { onDelete: "SET NULL" }),
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
- ], OrganizationPosition.prototype, "department", void 0);
69
- exports.OrganizationPosition = OrganizationPosition = __decorate([
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
- ], OrganizationPosition);
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
- export declare class OrganizationStaff extends _BaseEntity {
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: Organization;
16
- staff: 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.OrganizationStaff = void 0;
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
- const types_1 = require("../../types");
18
- let OrganizationStaff = class OrganizationStaff extends _base_entity_1._BaseEntity {
18
+ let OrganizationStaffEntity = class OrganizationStaffEntity extends _base_entity_1._BaseEntity {
19
19
  };
20
- exports.OrganizationStaff = OrganizationStaff;
20
+ exports.OrganizationStaffEntity = OrganizationStaffEntity;
21
21
  __decorate([
22
22
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
23
23
  __metadata("design:type", String)
24
- ], OrganizationStaff.prototype, "id", void 0);
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
- ], OrganizationStaff.prototype, "org_id", void 0);
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
- ], OrganizationStaff.prototype, "staff_id", void 0);
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
- ], OrganizationStaff.prototype, "staff_code", void 0);
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
- ], OrganizationStaff.prototype, "staff_type", void 0);
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
- ], OrganizationStaff.prototype, "status", void 0);
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
- ], OrganizationStaff.prototype, "join_date", void 0);
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
- ], OrganizationStaff.prototype, "end_date", void 0);
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
- ], OrganizationStaff.prototype, "is_active", void 0);
61
+ ], OrganizationStaffEntity.prototype, "is_active", void 0);
62
62
  __decorate([
63
- (0, typeorm_1.ManyToOne)(() => organization_entity_1.Organization, { onDelete: "CASCADE" }),
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.Organization)
66
- ], OrganizationStaff.prototype, "org", void 0);
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.Staff, { onDelete: "RESTRICT" }),
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.Staff)
71
- ], OrganizationStaff.prototype, "staff", void 0);
72
- exports.OrganizationStaff = OrganizationStaff = __decorate([
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
- ], OrganizationStaff);
76
+ ], OrganizationStaffEntity);
@@ -1,7 +1,7 @@
1
1
  import { _BaseEntity } from "../_base_entity";
2
- import { OrganizationStaff } from "./org_staff.entity";
3
- import { OrganizationBranch } from "./org_branch.entity";
4
- export declare class OrganizationStaffBranch extends _BaseEntity {
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: OrganizationStaff;
13
- branch: OrganizationBranch;
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.OrganizationStaffBranch = void 0;
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 OrganizationStaffBranch = class OrganizationStaffBranch extends _base_entity_1._BaseEntity {
17
+ let OrganizationStaffBranchEntity = class OrganizationStaffBranchEntity extends _base_entity_1._BaseEntity {
18
18
  };
19
- exports.OrganizationStaffBranch = OrganizationStaffBranch;
19
+ exports.OrganizationStaffBranchEntity = OrganizationStaffBranchEntity;
20
20
  __decorate([
21
21
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
22
  __metadata("design:type", String)
23
- ], OrganizationStaffBranch.prototype, "id", void 0);
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
- ], OrganizationStaffBranch.prototype, "org_staff_id", void 0);
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
- ], OrganizationStaffBranch.prototype, "branch_id", void 0);
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
- ], OrganizationStaffBranch.prototype, "is_primary", void 0);
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
- ], OrganizationStaffBranch.prototype, "effective_from", void 0);
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
- ], OrganizationStaffBranch.prototype, "effective_to", void 0);
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
- ], OrganizationStaffBranch.prototype, "is_active", void 0);
49
+ ], OrganizationStaffBranchEntity.prototype, "is_active", void 0);
50
50
  __decorate([
51
- (0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaff, { onDelete: "CASCADE" }),
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.OrganizationStaff)
54
- ], OrganizationStaffBranch.prototype, "org_staff", void 0);
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.OrganizationBranch, { onDelete: "RESTRICT" }),
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.OrganizationBranch)
59
- ], OrganizationStaffBranch.prototype, "branch", void 0);
60
- exports.OrganizationStaffBranch = OrganizationStaffBranch = __decorate([
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
- ], OrganizationStaffBranch);
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
- export declare class OrganizationStaffReportingLine extends _BaseEntity {
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: OrganizationStaff;
14
- manager_org_staff: OrganizationStaff;
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.OrganizationStaffReportingLine = void 0;
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
- let OrganizationStaffReportingLine = class OrganizationStaffReportingLine extends _base_entity_1._BaseEntity {
16
+ const org_staff_entity_1 = require("./org_staff.entity");
17
+ let OrganizationStaffReportingLineEntity = class OrganizationStaffReportingLineEntity extends _base_entity_1._BaseEntity {
18
18
  };
19
- exports.OrganizationStaffReportingLine = OrganizationStaffReportingLine;
19
+ exports.OrganizationStaffReportingLineEntity = OrganizationStaffReportingLineEntity;
20
20
  __decorate([
21
21
  (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
22
  __metadata("design:type", String)
23
- ], OrganizationStaffReportingLine.prototype, "id", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "org_staff_id", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "manager_org_staff_id", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "line_type", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "is_active", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "effective_from", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "effective_to", void 0);
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
- ], OrganizationStaffReportingLine.prototype, "is_primary", void 0);
58
+ ], OrganizationStaffReportingLineEntity.prototype, "is_primary", void 0);
59
59
  __decorate([
60
- (0, typeorm_1.ManyToOne)(() => org_staff_entity_1.OrganizationStaff, { onDelete: "CASCADE" }),
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.OrganizationStaff)
63
- ], OrganizationStaffReportingLine.prototype, "org_staff", void 0);
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.OrganizationStaff, { onDelete: "RESTRICT" }),
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.OrganizationStaff)
68
- ], OrganizationStaffReportingLine.prototype, "manager_org_staff", void 0);
69
- exports.OrganizationStaffReportingLine = OrganizationStaffReportingLine = __decorate([
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
- ], OrganizationStaffReportingLine);
77
+ ], OrganizationStaffReportingLineEntity);
@@ -1,6 +1,6 @@
1
1
  import { _BaseEntity } from "../_base_entity";
2
2
  import { OrgType } from "../../types";
3
- export declare class Organization extends _BaseEntity {
3
+ export declare class OrganizationEntity extends _BaseEntity {
4
4
  id: string;
5
5
  code: string;
6
6
  name: string;