@platform-modules/civil-aviation-authority 2.0.90 → 2.1.2

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.
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITApprovalSettings extends BaseModel {
3
+ level: number;
4
+ approval_role_id: number;
5
+ workflow_id: number;
6
+ constructor(level: number, approval_role_id: number, workflow_id: number);
7
+ }
@@ -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.ITApprovalSettings = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
16
+ constructor(level, approval_role_id, workflow_id) {
17
+ super();
18
+ this.level = level;
19
+ this.approval_role_id = approval_role_id;
20
+ this.workflow_id = workflow_id;
21
+ }
22
+ };
23
+ exports.ITApprovalSettings = ITApprovalSettings;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
26
+ __metadata("design:type", Number)
27
+ ], ITApprovalSettings.prototype, "level", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
30
+ __metadata("design:type", Number)
31
+ ], ITApprovalSettings.prototype, "approval_role_id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
34
+ __metadata("design:type", Number)
35
+ ], ITApprovalSettings.prototype, "workflow_id", void 0);
36
+ exports.ITApprovalSettings = ITApprovalSettings = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
38
+ (0, typeorm_1.Unique)(['workflow_id', 'level']),
39
+ __metadata("design:paramtypes", [Number, Number, Number])
40
+ ], ITApprovalSettings);
@@ -0,0 +1,6 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITServicesTypesMuscat extends BaseModel {
3
+ name: string;
4
+ name_in_arabic: string;
5
+ constructor(name: string, name_in_arabic: string);
6
+ }
@@ -0,0 +1,34 @@
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.ITServicesTypesMuscat = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
16
+ constructor(name, name_in_arabic) {
17
+ super();
18
+ this.name = name;
19
+ this.name_in_arabic = name_in_arabic;
20
+ }
21
+ };
22
+ exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ nullable: false }),
25
+ __metadata("design:type", String)
26
+ ], ITServicesTypesMuscat.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ nullable: false }),
29
+ __metadata("design:type", String)
30
+ ], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
31
+ exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
32
+ (0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
33
+ __metadata("design:paramtypes", [String, String])
34
+ ], ITServicesTypesMuscat);
@@ -0,0 +1,6 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITServicesTypesSalalah extends BaseModel {
3
+ name: string;
4
+ name_in_arabic: string;
5
+ constructor(name: string, name_in_arabic: string);
6
+ }
@@ -0,0 +1,34 @@
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.ITServicesTypesSalalah = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
16
+ constructor(name, name_in_arabic) {
17
+ super();
18
+ this.name = name;
19
+ this.name_in_arabic = name_in_arabic;
20
+ }
21
+ };
22
+ exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ nullable: false }),
25
+ __metadata("design:type", String)
26
+ ], ITServicesTypesSalalah.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ nullable: false }),
29
+ __metadata("design:type", String)
30
+ ], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
31
+ exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
32
+ (0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
33
+ __metadata("design:paramtypes", [String, String])
34
+ ], ITServicesTypesSalalah);
@@ -10,12 +10,11 @@ export declare class ItApprovalDetails extends BaseModel {
10
10
  sub_service_id: number | null;
11
11
  level: number;
12
12
  approver_user_id: number | null;
13
- delegation_user_id: number | null;
14
13
  approver_role_id: number | null;
15
14
  department_id: number | null;
16
15
  section_id: number | null;
17
16
  approved_by: number | null;
18
17
  comment: string;
19
18
  approval_status: ApprovalStatus;
20
- constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null, service_id?: number | null, sub_service_id?: number | null, delegation_user_id?: number | null);
19
+ constructor(request_id: number, approver_user_id: number | null, approver_role_id: number | null, comment: string, approval_status: ApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null, service_id?: number | null, sub_service_id?: number | null);
21
20
  }
@@ -19,7 +19,7 @@ var ApprovalStatus;
19
19
  ApprovalStatus["REJECTED"] = "Rejected";
20
20
  })(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
21
21
  let ItApprovalDetails = class ItApprovalDetails extends BaseModel_1.BaseModel {
22
- constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, service_id, sub_service_id, delegation_user_id) {
22
+ constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, service_id, sub_service_id) {
23
23
  super();
24
24
  this.request_id = request_id;
25
25
  this.approver_user_id = approver_user_id;
@@ -32,7 +32,6 @@ let ItApprovalDetails = class ItApprovalDetails extends BaseModel_1.BaseModel {
32
32
  this.approved_by = approved_by || null;
33
33
  this.service_id = service_id ?? null;
34
34
  this.sub_service_id = sub_service_id ?? null;
35
- this.delegation_user_id = delegation_user_id || null;
36
35
  }
37
36
  };
38
37
  exports.ItApprovalDetails = ItApprovalDetails;
@@ -56,10 +55,6 @@ __decorate([
56
55
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
57
56
  __metadata("design:type", Object)
58
57
  ], ItApprovalDetails.prototype, "approver_user_id", void 0);
59
- __decorate([
60
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
61
- __metadata("design:type", Object)
62
- ], ItApprovalDetails.prototype, "delegation_user_id", void 0);
63
58
  __decorate([
64
59
  (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
65
60
  __metadata("design:type", Object)
@@ -86,5 +81,5 @@ __decorate([
86
81
  ], ItApprovalDetails.prototype, "approval_status", void 0);
87
82
  exports.ItApprovalDetails = ItApprovalDetails = __decorate([
88
83
  (0, typeorm_1.Entity)({ name: 'it_approvals' }),
89
- __metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object, Object])
84
+ __metadata("design:paramtypes", [Number, Object, Object, String, String, Number, Object, Object, Object, Object, Object])
90
85
  ], ItApprovalDetails);
@@ -12,6 +12,11 @@ export declare class WorkflowHierarchy extends BaseModel {
12
12
  step_order: number;
13
13
  is_required: boolean;
14
14
  task_type: string | null;
15
+ decision_path: string | null;
16
+ parent_decision_step_order: number | null;
17
+ parent_task: string | null;
18
+ condition_expression: string | null;
19
+ is_decision_task: boolean;
15
20
  workflow_definition: WorkflowDefinitions;
16
- constructor(workflow_definition_id: number, department_id: number, section_id: number, approval_role_id: number, approval_user_id: number, step_order: number, is_required?: boolean, taskname?: string, status?: string, task?: any, task_type?: string);
21
+ constructor(workflow_definition_id: number, department_id: number, section_id: number, approval_role_id: number, approval_user_id: number, step_order: number, is_required?: boolean, taskname?: string, status?: string, task?: any, task_type?: string, decision_path?: string | null, parent_decision_step_order?: number | null, parent_task?: string | null, condition_expression?: string | null, is_decision_task?: boolean);
17
22
  }
@@ -14,7 +14,7 @@ const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  const WorkflowDefinitions_1 = require("./WorkflowDefinitions");
16
16
  let WorkflowHierarchy = class WorkflowHierarchy extends BaseModel_1.BaseModel {
17
- constructor(workflow_definition_id, department_id, section_id, approval_role_id, approval_user_id, step_order, is_required, taskname, status, task, task_type) {
17
+ constructor(workflow_definition_id, department_id, section_id, approval_role_id, approval_user_id, step_order, is_required, taskname, status, task, task_type, decision_path, parent_decision_step_order, parent_task, condition_expression, is_decision_task) {
18
18
  super();
19
19
  this.workflow_definition_id = workflow_definition_id;
20
20
  this.department_id = department_id;
@@ -27,6 +27,11 @@ let WorkflowHierarchy = class WorkflowHierarchy extends BaseModel_1.BaseModel {
27
27
  this.status = status || null;
28
28
  this.task = task || null;
29
29
  this.task_type = task_type || null;
30
+ this.decision_path = decision_path || null;
31
+ this.parent_decision_step_order = parent_decision_step_order || null;
32
+ this.parent_task = parent_task || null;
33
+ this.condition_expression = condition_expression || null;
34
+ this.is_decision_task = is_decision_task !== undefined ? is_decision_task : false;
30
35
  }
31
36
  };
32
37
  exports.WorkflowHierarchy = WorkflowHierarchy;
@@ -74,6 +79,26 @@ __decorate([
74
79
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
75
80
  __metadata("design:type", Object)
76
81
  ], WorkflowHierarchy.prototype, "task_type", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
84
+ __metadata("design:type", Object)
85
+ ], WorkflowHierarchy.prototype, "decision_path", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
88
+ __metadata("design:type", Object)
89
+ ], WorkflowHierarchy.prototype, "parent_decision_step_order", void 0);
90
+ __decorate([
91
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
92
+ __metadata("design:type", Object)
93
+ ], WorkflowHierarchy.prototype, "parent_task", void 0);
94
+ __decorate([
95
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
96
+ __metadata("design:type", Object)
97
+ ], WorkflowHierarchy.prototype, "condition_expression", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: false }),
100
+ __metadata("design:type", Boolean)
101
+ ], WorkflowHierarchy.prototype, "is_decision_task", void 0);
77
102
  __decorate([
78
103
  (0, typeorm_1.ManyToOne)(() => WorkflowDefinitions_1.WorkflowDefinitions, { onDelete: 'CASCADE' }),
79
104
  (0, typeorm_1.JoinColumn)({ name: 'workflow_definition_id' }),
@@ -82,5 +107,5 @@ __decorate([
82
107
  exports.WorkflowHierarchy = WorkflowHierarchy = __decorate([
83
108
  (0, typeorm_1.Entity)({ name: 'workflow_hierarchy' }),
84
109
  (0, typeorm_1.Unique)(['workflow_definition_id', 'step_order']),
85
- __metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Boolean, String, String, Object, String])
110
+ __metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Boolean, String, String, Object, String, Object, Object, Object, Object, Boolean])
86
111
  ], WorkflowHierarchy);
File without changes
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // import { Column, Entity, Unique } from "typeorm";
3
+ // import { BaseModel } from './BaseModel';
4
+ // @Entity({ name: 'workflows' })
5
+ // @Unique(['service_id', 'sub_service_id', 'request_for'])
6
+ // export class Workflows extends BaseModel {
7
+ // @Column({ type: 'varchar', length: 100, nullable: false })
8
+ // name: string;
9
+ // @Column({ type: 'bigint', nullable: false })
10
+ // service_id: number;
11
+ // @Column({ type: 'bigint', nullable: false })
12
+ // sub_service_id: number;
13
+ // @Column({ type: 'varchar', length: 20, nullable: false })
14
+ // request_for: string; // 'Self' | 'Behalf of' | 'Internal'
15
+ // @Column({ type: 'int', nullable: false })
16
+ // levels: number;
17
+ // constructor(
18
+ // name: string,
19
+ // service_id: number,
20
+ // sub_service_id: number,
21
+ // request_for: string,
22
+ // levels: number,
23
+ // ) {
24
+ // super();
25
+ // this.name = name;
26
+ // this.service_id = service_id;
27
+ // this.sub_service_id = sub_service_id;
28
+ // this.request_for = request_for;
29
+ // this.levels = levels;
30
+ // }
31
+ // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.90",
3
+ "version": "2.1.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,121 +1,121 @@
1
-
2
- import { Column, Entity } from "typeorm";
3
- import { BaseModel } from './BaseModel';
4
- export enum ContactFor {
5
- SELF = "Self",
6
- BEHALFOF = "Behalf of"
7
- }
8
- export enum status {
9
- PENDING = "Pending",
10
- ASSIGNED = "Assigned",
11
- IN_PROGRESS = "In Progress",
12
- APPROVED = "Approved",
13
- REJECTED = "Rejected"
14
- }
15
- @Entity({ name: 'it_help_desk_requests' })
16
- export class ITHelpDeskRequests extends BaseModel {
17
-
18
- @Column({ type: 'int', nullable: true })
19
- req_user_department_id: number | null;
20
-
21
- @Column({ type: 'int', nullable: true })
22
- req_user_section_id: number | null;
23
-
24
- @Column({ nullable: true })
25
- service_id: number;
26
-
27
- @Column({ nullable: true })
28
- sub_service_id: number;
29
-
30
- @Column({ type: 'int', nullable: true })
31
- service_type_id: number | null;
32
-
33
- @Column({ nullable: false })
34
- problem: string;
35
-
36
- @Column({
37
- type: "enum",
38
- enum: ContactFor,
39
- default: ContactFor.SELF,
40
- nullable: false,
41
- })
42
- request_for: ContactFor;
43
-
44
- @Column({ nullable: false })
45
- description: string;
46
-
47
- @Column({ nullable: false })
48
- extn_num: string;
49
-
50
- @Column({ nullable: false })
51
- contact_num: string;
52
-
53
- @Column({ type: 'varchar', length: 255, nullable: true })
54
- email: string | null;
55
-
56
- @Column({ type: 'varchar', length: 30, nullable: true })
57
- request_type: string;
58
-
59
- @Column({ type: 'varchar', length: 255, nullable: true })
60
- person_name: string | null;
61
-
62
- @Column({ type: 'varchar', length: 20, nullable: true })
63
- person_contact_number: string | null;
64
-
65
- @Column({ type: "date", nullable: false })
66
- request_date: Date;
67
-
68
- @Column({ nullable: false })
69
- user_id: number;
70
-
71
-
72
- @Column({
73
- type: "enum",
74
- enum: status,
75
- default: status.PENDING,
76
- nullable: false,
77
- })
78
- status: status;
79
-
80
- @Column({ type: "varchar", nullable: true })
81
- workflow_execution_id: string | null;
82
-
83
- constructor(
84
- service_id: number,
85
- sub_service_id: number,
86
- problem: string,
87
- request_for: ContactFor,
88
- description: string,
89
- extn_num: string,
90
- contact_num: string,
91
- request_date: Date,
92
- status: status,
93
- workflow_execution_id?: string,
94
- req_user_department_id?: number | null,
95
- req_user_section_id?: number | null,
96
- service_type_id?: number | null,
97
- person_name?: string | null,
98
- person_contact_number?: string | null,
99
- email?: string | null,
100
- request_type?: string
101
- ) {
102
- super();
103
- this.service_id = service_id;
104
- this.sub_service_id = sub_service_id;
105
- this.problem = problem;
106
- this.request_for = request_for;
107
- this.description = description;
108
- this.extn_num = extn_num;
109
- this.contact_num = contact_num;
110
- this.email = email || null;
111
- this.request_type = request_type || 'internal';
112
- this.person_name = person_name || null;
113
- this.person_contact_number = person_contact_number || null;
114
- this.request_date = request_date;
115
- this.status = status;
116
- this.workflow_execution_id = workflow_execution_id || null;
117
- this.req_user_department_id = req_user_department_id || null;
118
- this.req_user_section_id = req_user_section_id || null;
119
- this.service_type_id = service_type_id || null;
120
- }
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+ export enum ContactFor {
5
+ SELF = "Self",
6
+ BEHALFOF = "Behalf of"
7
+ }
8
+ export enum status {
9
+ PENDING = "Pending",
10
+ ASSIGNED = "Assigned",
11
+ IN_PROGRESS = "In Progress",
12
+ APPROVED = "Approved",
13
+ REJECTED = "Rejected"
14
+ }
15
+ @Entity({ name: 'it_help_desk_requests' })
16
+ export class ITHelpDeskRequests extends BaseModel {
17
+
18
+ @Column({ type: 'int', nullable: true })
19
+ req_user_department_id: number | null;
20
+
21
+ @Column({ type: 'int', nullable: true })
22
+ req_user_section_id: number | null;
23
+
24
+ @Column({ nullable: true })
25
+ service_id: number;
26
+
27
+ @Column({ nullable: true })
28
+ sub_service_id: number;
29
+
30
+ @Column({ type: 'int', nullable: true })
31
+ service_type_id: number | null;
32
+
33
+ @Column({ nullable: false })
34
+ problem: string;
35
+
36
+ @Column({
37
+ type: "enum",
38
+ enum: ContactFor,
39
+ default: ContactFor.SELF,
40
+ nullable: false,
41
+ })
42
+ request_for: ContactFor;
43
+
44
+ @Column({ nullable: false })
45
+ description: string;
46
+
47
+ @Column({ nullable: false })
48
+ extn_num: string;
49
+
50
+ @Column({ nullable: false })
51
+ contact_num: string;
52
+
53
+ @Column({ type: 'varchar', length: 255, nullable: true })
54
+ email: string | null;
55
+
56
+ @Column({ type: 'varchar', length: 30, nullable: true })
57
+ request_type: string;
58
+
59
+ @Column({ type: 'varchar', length: 255, nullable: true })
60
+ person_name: string | null;
61
+
62
+ @Column({ type: 'varchar', length: 20, nullable: true })
63
+ person_contact_number: string | null;
64
+
65
+ @Column({ type: "date", nullable: false })
66
+ request_date: Date;
67
+
68
+ @Column({ nullable: false })
69
+ user_id: number;
70
+
71
+
72
+ @Column({
73
+ type: "enum",
74
+ enum: status,
75
+ default: status.PENDING,
76
+ nullable: false,
77
+ })
78
+ status: status;
79
+
80
+ @Column({ type: "varchar", nullable: true })
81
+ workflow_execution_id: string | null;
82
+
83
+ constructor(
84
+ service_id: number,
85
+ sub_service_id: number,
86
+ problem: string,
87
+ request_for: ContactFor,
88
+ description: string,
89
+ extn_num: string,
90
+ contact_num: string,
91
+ request_date: Date,
92
+ status: status,
93
+ workflow_execution_id?: string,
94
+ req_user_department_id?: number | null,
95
+ req_user_section_id?: number | null,
96
+ service_type_id?: number | null,
97
+ person_name?: string | null,
98
+ person_contact_number?: string | null,
99
+ email?: string | null,
100
+ request_type?: string
101
+ ) {
102
+ super();
103
+ this.service_id = service_id;
104
+ this.sub_service_id = sub_service_id;
105
+ this.problem = problem;
106
+ this.request_for = request_for;
107
+ this.description = description;
108
+ this.extn_num = extn_num;
109
+ this.contact_num = contact_num;
110
+ this.email = email || null;
111
+ this.request_type = request_type || 'internal';
112
+ this.person_name = person_name || null;
113
+ this.person_contact_number = person_contact_number || null;
114
+ this.request_date = request_date;
115
+ this.status = status;
116
+ this.workflow_execution_id = workflow_execution_id || null;
117
+ this.req_user_department_id = req_user_department_id || null;
118
+ this.req_user_section_id = req_user_section_id || null;
119
+ this.service_type_id = service_type_id || null;
120
+ }
121
121
  }
@@ -39,6 +39,21 @@ export class WorkflowHierarchy extends BaseModel {
39
39
  @Column({ type: 'varchar',length: 255, nullable:true })
40
40
  task_type: string | null;
41
41
 
42
+ @Column({ type: 'varchar', length: 50, nullable: true })
43
+ decision_path: string | null; // 'true', 'false', or null for non-decision tasks (legacy support)
44
+
45
+ @Column({ type: 'integer', nullable: true })
46
+ parent_decision_step_order: number | null; // References step_order of the DECISION task (legacy support)
47
+
48
+ @Column({ type: 'varchar', length: 255, nullable: true })
49
+ parent_task: string | null; // Name of the previous task in the flow
50
+
51
+ @Column({ type: 'text', nullable: true })
52
+ condition_expression: string | null; // Logical condition for when this task should execute (e.g., "createdByRole == true")
53
+
54
+ @Column({ type: 'boolean', default: false, nullable: false })
55
+ is_decision_task: boolean; // Whether this task represents a decision node
56
+
42
57
  @ManyToOne(() => WorkflowDefinitions, { onDelete: 'CASCADE' })
43
58
  @JoinColumn({ name: 'workflow_definition_id' })
44
59
  workflow_definition: WorkflowDefinitions;
@@ -54,7 +69,12 @@ export class WorkflowHierarchy extends BaseModel {
54
69
  taskname?: string,
55
70
  status?: string,
56
71
  task?: any,
57
- task_type?:string
72
+ task_type?: string,
73
+ decision_path?: string | null,
74
+ parent_decision_step_order?: number | null,
75
+ parent_task?: string | null,
76
+ condition_expression?: string | null,
77
+ is_decision_task?: boolean
58
78
  ) {
59
79
  super();
60
80
  this.workflow_definition_id = workflow_definition_id;
@@ -68,5 +88,10 @@ export class WorkflowHierarchy extends BaseModel {
68
88
  this.status = status || null;
69
89
  this.task = task || null;
70
90
  this.task_type = task_type || null;
91
+ this.decision_path = decision_path || null;
92
+ this.parent_decision_step_order = parent_decision_step_order || null;
93
+ this.parent_task = parent_task || null;
94
+ this.condition_expression = condition_expression || null;
95
+ this.is_decision_task = is_decision_task !== undefined ? is_decision_task : false;
71
96
  }
72
97
  }