@platform-modules/foreign-ministry 1.1.35 → 1.1.37
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/EarlyCheckoutWorkflowModel.d.ts +4 -0
- package/dist/models/EarlyCheckoutWorkflowModel.js +16 -0
- package/dist/models/GeneralServiceApprovalsModel.d.ts +26 -0
- package/dist/models/GeneralServiceApprovalsModel.js +109 -0
- package/dist/models/GeneralServiceAttachmentsModel.d.ts +10 -0
- package/dist/models/GeneralServiceAttachmentsModel.js +56 -0
- package/dist/models/GeneralServiceChatsModel.d.ts +9 -0
- package/dist/models/GeneralServiceChatsModel.js +51 -0
- package/dist/models/GeneralServiceRequestsModel.d.ts +36 -0
- package/dist/models/GeneralServiceRequestsModel.js +137 -0
- package/dist/models/GeneralServiceWorkFlowModel.d.ts +21 -0
- package/dist/models/GeneralServiceWorkFlowModel.js +80 -0
- package/dist/models/HelpdeskCategoriesModel.d.ts +9 -0
- package/dist/models/HelpdeskCategoriesModel.js +49 -0
- package/dist/models/HelpdeskSubCategoriesModel.d.ts +10 -0
- package/dist/models/HelpdeskSubCategoriesModel.js +54 -0
- package/dist/models/IssueTypesModel.d.ts +10 -0
- package/dist/models/IssueTypesModel.js +54 -0
- package/dist/models/RoutingGroupsModel.d.ts +13 -0
- package/dist/models/RoutingGroupsModel.js +67 -0
- package/dist/models/StayAfterHoursWorkflowModel.d.ts +4 -0
- package/dist/models/StayAfterHoursWorkflowModel.js +16 -0
- package/package.json +1 -1
- package/src/models/EarlyCheckoutWorkflowModel.ts +12 -0
- package/src/models/GeneralServiceApprovalsModel.ts +95 -0
- package/src/models/GeneralServiceAttachmentsModel.ts +43 -0
- package/src/models/GeneralServiceChatsModel.ts +39 -0
- package/src/models/GeneralServiceRequestsModel.ts +113 -0
- package/src/models/GeneralServiceWorkFlowModel.ts +78 -0
- package/src/models/HelpdeskCategoriesModel.ts +35 -0
- package/src/models/HelpdeskSubCategoriesModel.ts +40 -0
- package/src/models/IssueTypesModel.ts +47 -0
- package/src/models/RoutingGroupsModel.ts +64 -0
- package/src/models/StayAfterHoursWorkflowModel.ts +12 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
- package/dist/models/UpdateAttendenceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendenceRequestModel.js +0 -86
|
@@ -0,0 +1,54 @@
|
|
|
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.HelpdeskSubCategories = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpdeskSubCategories = class HelpdeskSubCategories extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, category_id, description, code, priority) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.category_id = category_id;
|
|
20
|
+
this.description = description || null;
|
|
21
|
+
this.code = code || null;
|
|
22
|
+
this.is_active = true;
|
|
23
|
+
this.priority = priority || null;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.HelpdeskSubCategories = HelpdeskSubCategories;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], HelpdeskSubCategories.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], HelpdeskSubCategories.prototype, "description", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], HelpdeskSubCategories.prototype, "category_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], HelpdeskSubCategories.prototype, "code", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], HelpdeskSubCategories.prototype, "is_active", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], HelpdeskSubCategories.prototype, "priority", void 0);
|
|
51
|
+
exports.HelpdeskSubCategories = HelpdeskSubCategories = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'helpdesk_sub_categories' }),
|
|
53
|
+
__metadata("design:paramtypes", [String, Number, Object, Object, Object])
|
|
54
|
+
], HelpdeskSubCategories);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class IssueTypes extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string | null;
|
|
5
|
+
category_id: number | null;
|
|
6
|
+
subcategory_id: number | null;
|
|
7
|
+
is_active: boolean;
|
|
8
|
+
priority: number | null;
|
|
9
|
+
constructor(name: string, description?: string, priority?: number | null, category_id?: number | null, subcategory_id?: number | null);
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.IssueTypes = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let IssueTypes = class IssueTypes extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, description, priority, category_id, subcategory_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.category_id = category_id || null;
|
|
20
|
+
this.subcategory_id = subcategory_id || null;
|
|
21
|
+
this.description = description || null;
|
|
22
|
+
this.is_active = true;
|
|
23
|
+
this.priority = priority || null;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.IssueTypes = IssueTypes;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], IssueTypes.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], IssueTypes.prototype, "description", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], IssueTypes.prototype, "category_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], IssueTypes.prototype, "subcategory_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], IssueTypes.prototype, "is_active", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], IssueTypes.prototype, "priority", void 0);
|
|
51
|
+
exports.IssueTypes = IssueTypes = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'issue_types' }),
|
|
53
|
+
__metadata("design:paramtypes", [String, String, Object, Object, Object])
|
|
54
|
+
], IssueTypes);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class RoutingGroups extends BaseModel {
|
|
3
|
+
group_name: string;
|
|
4
|
+
description: string | null;
|
|
5
|
+
category_id: number | null;
|
|
6
|
+
subcategory_id: number | null;
|
|
7
|
+
issue_type_id: number | null;
|
|
8
|
+
assigned_role_id: number | null;
|
|
9
|
+
department_id: number | null;
|
|
10
|
+
section_id: number | null;
|
|
11
|
+
is_active: boolean;
|
|
12
|
+
constructor(group_name: string, issue_type_id?: number | null, assigned_role_id?: number | null, description?: string, category_id?: number | null, subcategory_id?: number | null);
|
|
13
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.RoutingGroups = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let RoutingGroups = class RoutingGroups extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(group_name, issue_type_id, assigned_role_id, description, category_id, subcategory_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.group_name = group_name;
|
|
19
|
+
this.category_id = category_id || null;
|
|
20
|
+
this.subcategory_id = subcategory_id || null;
|
|
21
|
+
this.issue_type_id = issue_type_id || null;
|
|
22
|
+
this.assigned_role_id = assigned_role_id || null;
|
|
23
|
+
this.description = description || null;
|
|
24
|
+
this.is_active = true;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.RoutingGroups = RoutingGroups;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], RoutingGroups.prototype, "group_name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], RoutingGroups.prototype, "description", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], RoutingGroups.prototype, "category_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], RoutingGroups.prototype, "subcategory_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], RoutingGroups.prototype, "issue_type_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], RoutingGroups.prototype, "assigned_role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], RoutingGroups.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], RoutingGroups.prototype, "section_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], RoutingGroups.prototype, "is_active", void 0);
|
|
64
|
+
exports.RoutingGroups = RoutingGroups = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: 'routing_groups' }),
|
|
66
|
+
__metadata("design:paramtypes", [String, Object, Object, String, Object, Object])
|
|
67
|
+
], RoutingGroups);
|
|
@@ -10,4 +10,8 @@ export declare class StayAfterHoursWorkFlow extends BaseModel {
|
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
12
|
status: StayAfterHoursWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
13
17
|
}
|
|
@@ -41,6 +41,22 @@ __decorate([
|
|
|
41
41
|
(0, typeorm_1.Column)({ type: 'enum', enum: StayAfterHoursWorkFlowStatus, default: StayAfterHoursWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], StayAfterHoursWorkFlow.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], StayAfterHoursWorkFlow.prototype, "user_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], StayAfterHoursWorkFlow.prototype, "role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], StayAfterHoursWorkFlow.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], StayAfterHoursWorkFlow.prototype, "section_id", void 0);
|
|
44
60
|
exports.StayAfterHoursWorkFlow = StayAfterHoursWorkFlow = __decorate([
|
|
45
61
|
(0, typeorm_1.Entity)({ name: 'stay_after_hours_workflows' })
|
|
46
62
|
], StayAfterHoursWorkFlow);
|
package/package.json
CHANGED
|
@@ -23,6 +23,18 @@ export class EarlyCheckoutWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({ type: 'enum', enum: EarlyCheckoutWorkFlowStatus, default: EarlyCheckoutWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
25
|
status: EarlyCheckoutWorkFlowStatus;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
user_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
role_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
department_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
section_id: number | null;
|
|
26
38
|
}
|
|
27
39
|
|
|
28
40
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
SKIPPED = "Skipped",
|
|
9
|
+
IN_PROGRESS = "In Progress"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'general_service_approvals' })
|
|
13
|
+
export class GeneralServiceApprovals extends BaseModel {
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
level: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
approver_user_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int' })
|
|
24
|
+
approver_role_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'text', nullable: true })
|
|
27
|
+
comment: string | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'enum', enum: GeneralServiceApprovalStatus, default: GeneralServiceApprovalStatus.PENDING })
|
|
30
|
+
approval_status: GeneralServiceApprovalStatus;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
33
|
+
action_date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
department_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
section_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
approved_by: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
service_id: number | null; // For filtering and multi-service support
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'int', nullable: true })
|
|
48
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
49
|
+
|
|
50
|
+
// Helpdesk-specific fields (for assignment/routing tracking)
|
|
51
|
+
@Column({ type: 'int', nullable: true })
|
|
52
|
+
assigned_group_id: number | null; // Assigned group ID (for helpdesk routing)
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'int', nullable: true })
|
|
55
|
+
transfer_from_user_id: number | null; // User who transferred from
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'int', nullable: true })
|
|
58
|
+
transfer_to_user_id: number | null; // User who transferred to
|
|
59
|
+
|
|
60
|
+
// @Column({ type: 'timestamp', nullable: true })
|
|
61
|
+
// sla_start_time: Date | null; // SLA tracking start time for this assignment
|
|
62
|
+
|
|
63
|
+
// @Column({ type: 'timestamp', nullable: true })
|
|
64
|
+
// sla_end_time: Date | null; // SLA tracking end time for this assignment
|
|
65
|
+
|
|
66
|
+
// @Column({ type: 'boolean', default: false })
|
|
67
|
+
// sla_breached: boolean; // Whether SLA was breached for this assignment
|
|
68
|
+
|
|
69
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
70
|
+
// Use request_id to join manually when needed
|
|
71
|
+
|
|
72
|
+
constructor(
|
|
73
|
+
request_id: number,
|
|
74
|
+
level: number,
|
|
75
|
+
approver_role_id: number,
|
|
76
|
+
approval_status: GeneralServiceApprovalStatus,
|
|
77
|
+
department_id: number | null,
|
|
78
|
+
section_id: number | null,
|
|
79
|
+
approved_by: number | null,
|
|
80
|
+
service_id?: number | null,
|
|
81
|
+
sub_service_id?: number | null
|
|
82
|
+
) {
|
|
83
|
+
super();
|
|
84
|
+
this.request_id = request_id;
|
|
85
|
+
this.level = level;
|
|
86
|
+
this.approver_role_id = approver_role_id;
|
|
87
|
+
this.approval_status = approval_status;
|
|
88
|
+
this.department_id = department_id;
|
|
89
|
+
this.section_id = section_id;
|
|
90
|
+
this.approved_by = approved_by;
|
|
91
|
+
this.service_id = service_id || null;
|
|
92
|
+
this.sub_service_id = sub_service_id || null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'general_service_attachments' })
|
|
5
|
+
export class GeneralServiceAttachments extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 500 })
|
|
10
|
+
file_url: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 255 })
|
|
13
|
+
file_name: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
16
|
+
file_type: string; // PDF, JPG, PNG, etc.
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
service_id: number | null; // For filtering and multi-service support
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: true })
|
|
22
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
23
|
+
|
|
24
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
25
|
+
// Use request_id to join manually when needed
|
|
26
|
+
|
|
27
|
+
constructor(
|
|
28
|
+
request_id: number,
|
|
29
|
+
file_url: string,
|
|
30
|
+
file_name: string,
|
|
31
|
+
service_id?: number | null,
|
|
32
|
+
sub_service_id?: number | null
|
|
33
|
+
) {
|
|
34
|
+
super();
|
|
35
|
+
this.request_id = request_id;
|
|
36
|
+
this.file_url = file_url;
|
|
37
|
+
this.file_name = file_name;
|
|
38
|
+
this.file_type = 'PDF';
|
|
39
|
+
this.service_id = service_id || null;
|
|
40
|
+
this.sub_service_id = sub_service_id || null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'general_service_chats' })
|
|
5
|
+
export class GeneralServiceChats extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
content: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int' })
|
|
13
|
+
sender_user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: true })
|
|
16
|
+
service_id: number | null; // For filtering and multi-service support
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
20
|
+
|
|
21
|
+
// Note: No relationship mapping - this table is generic and can be used with any request table
|
|
22
|
+
// Use request_id to join manually when needed
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
request_id: number,
|
|
26
|
+
content: string,
|
|
27
|
+
sender_user_id: number,
|
|
28
|
+
service_id?: number | null,
|
|
29
|
+
sub_service_id?: number | null
|
|
30
|
+
) {
|
|
31
|
+
super();
|
|
32
|
+
this.request_id = request_id;
|
|
33
|
+
this.content = content;
|
|
34
|
+
this.sender_user_id = sender_user_id;
|
|
35
|
+
this.service_id = service_id || null;
|
|
36
|
+
this.sub_service_id = sub_service_id || null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceRequestStatus {
|
|
5
|
+
DRAFT = "Draft",
|
|
6
|
+
SUBMITTED = "Submitted",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected",
|
|
11
|
+
COMPLETED = "Completed",
|
|
12
|
+
CANCELLED = "Cancelled"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Entity({ name: 'general_service_requests' })
|
|
16
|
+
export class GeneralServiceRequests extends BaseModel {
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
user_id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'varchar', length: 20, nullable: true })
|
|
21
|
+
contact_number: string | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
24
|
+
person_name: string | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
27
|
+
request_date: Date;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'enum', enum: GeneralServiceRequestStatus, default: GeneralServiceRequestStatus.PENDING })
|
|
30
|
+
request_status: GeneralServiceRequestStatus;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
33
|
+
request_close_date: Date | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
problem: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
service_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
sub_service_id: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
section_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
48
|
+
workflow_execution_id: string | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'int', nullable: true })
|
|
51
|
+
issue_type_id: number | null; // Reference to issue types table
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'int', nullable: true })
|
|
54
|
+
assigned_group_id: number | null; // Reference to routing groups table
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
57
|
+
group_name: string | null; // Auto-populated routing group name
|
|
58
|
+
|
|
59
|
+
// Helpdesk-specific fields
|
|
60
|
+
@Column({ type: 'int', nullable: true })
|
|
61
|
+
category_id: number | null; // Helpdesk category (IT, Non-IT, etc.)
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'int', nullable: true })
|
|
64
|
+
subcategory_id: number | null; // Helpdesk subcategory
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@Column({ type: 'int', nullable: true })
|
|
68
|
+
current_assignee_group_id: number | null; // Currently assigned group
|
|
69
|
+
|
|
70
|
+
@Column({ type: 'int', nullable: true })
|
|
71
|
+
current_assignee_user_id: number | null; // Currently assigned individual user (for individual routing)
|
|
72
|
+
|
|
73
|
+
@Column({ type: 'text', nullable: true })
|
|
74
|
+
closure_reason: string | null; // Reason for closure (requirement #12)
|
|
75
|
+
|
|
76
|
+
@Column({ type: 'text', nullable: true })
|
|
77
|
+
description: string | null;
|
|
78
|
+
|
|
79
|
+
@Column({ type: 'text', nullable: true })
|
|
80
|
+
extension_number: string | null;
|
|
81
|
+
|
|
82
|
+
@Column({ type: 'text', nullable: true })
|
|
83
|
+
priority: string | null;
|
|
84
|
+
|
|
85
|
+
// @Column({ type: 'timestamp', nullable: true })
|
|
86
|
+
// sla_start_time: Date | null; // SLA tracking start time
|
|
87
|
+
|
|
88
|
+
// @Column({ type: 'timestamp', nullable: true })
|
|
89
|
+
// sla_end_time: Date | null; // SLA tracking end time
|
|
90
|
+
|
|
91
|
+
// @Column({ type: 'boolean', default: false })
|
|
92
|
+
// sla_breached: boolean; // Whether SLA was breached
|
|
93
|
+
|
|
94
|
+
// Note: No relationship mappings - these 4 tables (approvals, workflows, chats, attachments)
|
|
95
|
+
// are generic and can be used with any request table. Use request_id to join manually when needed.
|
|
96
|
+
|
|
97
|
+
constructor(
|
|
98
|
+
user_id: number,
|
|
99
|
+
service_id: number | null,
|
|
100
|
+
sub_service_id: number | null,
|
|
101
|
+
section_id: number | null,
|
|
102
|
+
) {
|
|
103
|
+
super();
|
|
104
|
+
this.user_id = user_id;
|
|
105
|
+
|
|
106
|
+
this.request_date = new Date();
|
|
107
|
+
this.request_status = GeneralServiceRequestStatus.PENDING;
|
|
108
|
+
this.service_id = service_id;
|
|
109
|
+
this.sub_service_id = sub_service_id;
|
|
110
|
+
this.section_id = section_id;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum GeneralServiceWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
FAILED = "Failed"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'general_service_work_flows' })
|
|
13
|
+
export class GeneralServiceWorkFlow extends BaseModel {
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
18
|
+
approval_id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'enum', enum: GeneralServiceWorkFlowStatus, default: GeneralServiceWorkFlowStatus.NOT_YET_STARTED })
|
|
21
|
+
status: GeneralServiceWorkFlowStatus;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
approved_by_user_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
approved_by_role_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'varchar', length: 500 })
|
|
30
|
+
content: string;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
33
|
+
date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
service_id: number | null; // For filtering and multi-service support
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
sub_service_id: number | null; // For filtering and multi-service support
|
|
40
|
+
|
|
41
|
+
// Helpdesk-specific fields (for transfer tracking and closure)
|
|
42
|
+
// @Column({ type: 'int', nullable: true })
|
|
43
|
+
// transfer_from_group_id: number | null; // Group transferred from
|
|
44
|
+
|
|
45
|
+
// @Column({ type: 'int', nullable: true })
|
|
46
|
+
// transfer_to_group_id: number | null; // Group transferred to
|
|
47
|
+
|
|
48
|
+
// @Column({ type: 'int', nullable: true })
|
|
49
|
+
// transfer_from_user_id: number | null; // User transferred from
|
|
50
|
+
|
|
51
|
+
// @Column({ type: 'int', nullable: true })
|
|
52
|
+
// transfer_to_user_id: number | null; // User transferred to
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'text', nullable: true })
|
|
55
|
+
closure_reason: string | null; // Reason for closure (requirement #12)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
constructor(
|
|
59
|
+
request_id: number,
|
|
60
|
+
status: GeneralServiceWorkFlowStatus,
|
|
61
|
+
approved_by_user_id: number,
|
|
62
|
+
approved_by_role_id: number,
|
|
63
|
+
content: string,
|
|
64
|
+
service_id?: number | null,
|
|
65
|
+
sub_service_id?: number | null
|
|
66
|
+
) {
|
|
67
|
+
super();
|
|
68
|
+
this.request_id = request_id;
|
|
69
|
+
this.status = status;
|
|
70
|
+
this.approved_by_user_id = approved_by_user_id;
|
|
71
|
+
this.approved_by_role_id = approved_by_role_id;
|
|
72
|
+
this.content = content;
|
|
73
|
+
this.date = new Date();
|
|
74
|
+
this.service_id = service_id || null;
|
|
75
|
+
this.sub_service_id = sub_service_id || null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'helpdesk_categories' })
|
|
5
|
+
export class HelpdeskCategories extends BaseModel {
|
|
6
|
+
@Column({ type: 'varchar', length: 255 })
|
|
7
|
+
name: string; // e.g., "IT", "Non-IT", "HR", "Finance"
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
10
|
+
description: string | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
13
|
+
code: string | null; // e.g., "IT", "NON_IT"
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'boolean', default: true })
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
priority: number | null; // For ordering
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
name: string,
|
|
23
|
+
description?: string | null,
|
|
24
|
+
code?: string | null,
|
|
25
|
+
priority?: number | null
|
|
26
|
+
) {
|
|
27
|
+
super();
|
|
28
|
+
this.name = name;
|
|
29
|
+
this.description = description || null;
|
|
30
|
+
this.code = code || null;
|
|
31
|
+
this.is_active = true;
|
|
32
|
+
this.priority = priority || null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|