@platform-modules/civil-aviation-authority 2.0.4 → 2.0.6
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/.env +9 -7
- package/dist/data-source.js +11 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/ITServicesTypesModel.d.ts +5 -0
- package/dist/models/ITServicesTypesModel.js +29 -0
- package/dist/models/LogisticsApprovalModel.d.ts +19 -0
- package/dist/models/LogisticsApprovalModel.js +80 -0
- package/dist/models/LogisticsAttachmentModel.d.ts +11 -0
- package/dist/models/LogisticsAttachmentModel.js +59 -0
- package/dist/models/LogisticsChatModel.d.ts +17 -0
- package/dist/models/LogisticsChatModel.js +67 -0
- package/dist/models/LogisticsModel.d.ts +52 -0
- package/dist/models/LogisticsModel.js +180 -0
- package/dist/models/LogisticsWorkflowModel.d.ts +14 -0
- package/dist/models/LogisticsWorkflowModel.js +56 -0
- package/package.json +1 -1
- package/src/data-source.ts +84 -74
- package/src/index.ts +33 -28
- package/src/models/BaseModel.ts +46 -46
- package/src/models/ITHelpDeskModel.ts +114 -114
- package/src/models/ItApprovalsModel.ts +61 -61
- package/src/models/LogisticsApprovalModel.ts +67 -0
- package/src/models/LogisticsAttachmentModel.ts +50 -0
- package/src/models/LogisticsChatModel.ts +55 -0
- package/src/models/LogisticsModel.ts +167 -0
- package/src/models/LogisticsWorkflowModel.ts +42 -0
|
@@ -0,0 +1,56 @@
|
|
|
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.LogisticsWorkFlow = exports.LogisticsWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var LogisticsWorkFlowStatus;
|
|
16
|
+
(function (LogisticsWorkFlowStatus) {
|
|
17
|
+
LogisticsWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
LogisticsWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
LogisticsWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(LogisticsWorkFlowStatus || (exports.LogisticsWorkFlowStatus = LogisticsWorkFlowStatus = {}));
|
|
21
|
+
//This model is used to store the logistics workflow status and activity logs
|
|
22
|
+
let LogisticsWorkFlow = class LogisticsWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id) {
|
|
24
|
+
super();
|
|
25
|
+
this.request_id = request_id;
|
|
26
|
+
this.service_id = service_id || null;
|
|
27
|
+
this.sub_service_id = sub_service_id || null;
|
|
28
|
+
this.content = content;
|
|
29
|
+
this.status = status;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.LogisticsWorkFlow = LogisticsWorkFlow;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], LogisticsWorkFlow.prototype, "request_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], LogisticsWorkFlow.prototype, "service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LogisticsWorkFlow.prototype, "sub_service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], LogisticsWorkFlow.prototype, "content", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: LogisticsWorkFlowStatus, default: LogisticsWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], LogisticsWorkFlow.prototype, "status", void 0);
|
|
53
|
+
exports.LogisticsWorkFlow = LogisticsWorkFlow = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)({ name: 'logistics_workflows' }),
|
|
55
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number])
|
|
56
|
+
], LogisticsWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -1,74 +1,84 @@
|
|
|
1
|
-
// src/data-source.ts
|
|
2
|
-
import 'reflect-metadata';
|
|
3
|
-
import { DataSource } from 'typeorm';
|
|
4
|
-
import 'dotenv/config';
|
|
5
|
-
import { User } from './models/user'; // import all entities here
|
|
6
|
-
import { userSessions } from './models/user-sessions';
|
|
7
|
-
import { Role } from './models/role';
|
|
8
|
-
import { ITHelpDeskRequests } from './models/ITHelpDeskModel';
|
|
9
|
-
import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
|
|
10
|
-
import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
|
|
11
|
-
import { ServiceType } from './models/ServiceTypeModel';
|
|
12
|
-
import { CAAServices } from './models/CAAServices';
|
|
13
|
-
import { CAASubServices } from './models/CAASubServices';
|
|
14
|
-
import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
15
|
-
// import { Workflows } from './models/Workflows';
|
|
16
|
-
import { ItApprovalDetails } from './models/ItApprovalsModel';
|
|
17
|
-
import { ItWorkFlow } from './models/ItWorkflowModel';
|
|
18
|
-
import { WorkflowDefinitions } from './models/WorkflowDefinitions';
|
|
19
|
-
import { WorkflowTask } from './models/WorkflowTask';
|
|
20
|
-
import { Departments } from './models/DepartmentsModel';
|
|
21
|
-
import { Sections } from './models/SectionModel';
|
|
22
|
-
import { WorkflowHierarchy } from './models/WorkflowHierarchy';
|
|
23
|
-
import { WorkflowTaskNames } from './models/WorkflowTaskNames';
|
|
24
|
-
import { Directorate } from './models/DirectorateModel';
|
|
25
|
-
import { Position } from './models/PositionModel';
|
|
26
|
-
import { ServiceBookmarks } from './models/serviceBookmarksModel';
|
|
27
|
-
import { ContactInfo } from './models/contactInfoModel';
|
|
28
|
-
import { UserRole } from './models/userRolesModel';
|
|
29
|
-
import { RoleRights } from './models/roleRightsModel';
|
|
30
|
-
import { Notification } from './models/NotificationModel';
|
|
31
|
-
import { ITRequestChat } from './models/ITRequestChatModel';
|
|
32
|
-
import { ITRequestAttachment } from './models/ITRequestAttachmentModel';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
// src/data-source.ts
|
|
2
|
+
import 'reflect-metadata';
|
|
3
|
+
import { DataSource } from 'typeorm';
|
|
4
|
+
import 'dotenv/config';
|
|
5
|
+
import { User } from './models/user'; // import all entities here
|
|
6
|
+
import { userSessions } from './models/user-sessions';
|
|
7
|
+
import { Role } from './models/role';
|
|
8
|
+
import { ITHelpDeskRequests } from './models/ITHelpDeskModel';
|
|
9
|
+
import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
|
|
10
|
+
import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
|
|
11
|
+
import { ServiceType } from './models/ServiceTypeModel';
|
|
12
|
+
import { CAAServices } from './models/CAAServices';
|
|
13
|
+
import { CAASubServices } from './models/CAASubServices';
|
|
14
|
+
import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
15
|
+
// import { Workflows } from './models/Workflows';
|
|
16
|
+
import { ItApprovalDetails } from './models/ItApprovalsModel';
|
|
17
|
+
import { ItWorkFlow } from './models/ItWorkflowModel';
|
|
18
|
+
import { WorkflowDefinitions } from './models/WorkflowDefinitions';
|
|
19
|
+
import { WorkflowTask } from './models/WorkflowTask';
|
|
20
|
+
import { Departments } from './models/DepartmentsModel';
|
|
21
|
+
import { Sections } from './models/SectionModel';
|
|
22
|
+
import { WorkflowHierarchy } from './models/WorkflowHierarchy';
|
|
23
|
+
import { WorkflowTaskNames } from './models/WorkflowTaskNames';
|
|
24
|
+
import { Directorate } from './models/DirectorateModel';
|
|
25
|
+
import { Position } from './models/PositionModel';
|
|
26
|
+
import { ServiceBookmarks } from './models/serviceBookmarksModel';
|
|
27
|
+
import { ContactInfo } from './models/contactInfoModel';
|
|
28
|
+
import { UserRole } from './models/userRolesModel';
|
|
29
|
+
import { RoleRights } from './models/roleRightsModel';
|
|
30
|
+
import { Notification } from './models/NotificationModel';
|
|
31
|
+
import { ITRequestChat } from './models/ITRequestChatModel';
|
|
32
|
+
import { ITRequestAttachment } from './models/ITRequestAttachmentModel';
|
|
33
|
+
import { LogisticsRequests } from './models/LogisticsModel';
|
|
34
|
+
import { LogisticsApprovalDetails } from './models/LogisticsApprovalModel';
|
|
35
|
+
import { LogisticsRequestChat } from './models/LogisticsChatModel';
|
|
36
|
+
import { LogisticsRequestAttachment } from './models/LogisticsAttachmentModel';
|
|
37
|
+
import { LogisticsWorkFlow } from './models/LogisticsWorkflowModel';
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export const AppDataSource = new DataSource({
|
|
42
|
+
type: 'postgres',
|
|
43
|
+
host: process.env.DB_HOST || 'localhost',
|
|
44
|
+
port: +(process.env.DB_PORT || 5432),
|
|
45
|
+
username: process.env.DB_USER || 'postgres',
|
|
46
|
+
password: process.env.DB_PASS || 'postgres',
|
|
47
|
+
database: process.env.DB_NAME || 'common_models',
|
|
48
|
+
synchronize: true, // auto-create tables (disable in prod)
|
|
49
|
+
logging: false,
|
|
50
|
+
entities: [
|
|
51
|
+
User,userSessions,
|
|
52
|
+
Role,
|
|
53
|
+
ITHelpDeskRequests,
|
|
54
|
+
ITServicesTypesSalalah,
|
|
55
|
+
ITServicesTypesMuscat,
|
|
56
|
+
ServiceType,
|
|
57
|
+
CAAServices,
|
|
58
|
+
CAASubServices,
|
|
59
|
+
ITApprovalSettings,
|
|
60
|
+
// Workflows,
|
|
61
|
+
ItApprovalDetails,
|
|
62
|
+
ItWorkFlow,
|
|
63
|
+
WorkflowDefinitions,
|
|
64
|
+
WorkflowTask,
|
|
65
|
+
Departments,
|
|
66
|
+
Sections,
|
|
67
|
+
WorkflowHierarchy,
|
|
68
|
+
WorkflowTaskNames,
|
|
69
|
+
Directorate,
|
|
70
|
+
Position,
|
|
71
|
+
ServiceBookmarks,
|
|
72
|
+
ContactInfo,
|
|
73
|
+
UserRole,
|
|
74
|
+
RoleRights,
|
|
75
|
+
Notification,
|
|
76
|
+
ITRequestChat,
|
|
77
|
+
ITRequestAttachment,
|
|
78
|
+
LogisticsRequests,
|
|
79
|
+
LogisticsApprovalDetails,
|
|
80
|
+
LogisticsRequestChat,
|
|
81
|
+
LogisticsRequestAttachment,
|
|
82
|
+
LogisticsWorkFlow
|
|
83
|
+
],
|
|
84
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
export * from './models/user';
|
|
2
|
-
export * from './models/role';
|
|
3
|
-
export * from './models/user-sessions';
|
|
4
|
-
export * from './models/ITHelpDeskModel';
|
|
5
|
-
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
-
export * from './models/ITServicesTypesMuscatModel';
|
|
7
|
-
export * from './models/ServiceTypeModel';
|
|
8
|
-
export * from './models/CAAServices';
|
|
9
|
-
export * from './models/CAASubServices';
|
|
10
|
-
export * from './models/ITApprovalSettings';
|
|
11
|
-
// export * from './models/Workflows';
|
|
12
|
-
export * from './models/ItApprovalsModel';
|
|
13
|
-
export * from './models/ItWorkflowModel';
|
|
14
|
-
export * from './models/WorkflowDefinitions';
|
|
15
|
-
export * from './models/WorkflowTask';
|
|
16
|
-
export * from './models/DepartmentsModel';
|
|
17
|
-
export * from './models/SectionModel';
|
|
18
|
-
export * from './models/WorkflowHierarchy';
|
|
19
|
-
export * from './models/WorkflowTaskNames';
|
|
20
|
-
export * from './models/DirectorateModel';
|
|
21
|
-
export * from './models/PositionModel';
|
|
22
|
-
export * from './models/serviceBookmarksModel';
|
|
23
|
-
export * from './models/contactInfoModel';
|
|
24
|
-
export * from './models/userRolesModel';
|
|
25
|
-
export * from './models/roleRightsModel';
|
|
26
|
-
export * from './models/NotificationModel';
|
|
27
|
-
export * from './models/ITRequestChatModel';
|
|
28
|
-
export * from './models/ITRequestAttachmentModel';
|
|
1
|
+
export * from './models/user';
|
|
2
|
+
export * from './models/role';
|
|
3
|
+
export * from './models/user-sessions';
|
|
4
|
+
export * from './models/ITHelpDeskModel';
|
|
5
|
+
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
+
export * from './models/ITServicesTypesMuscatModel';
|
|
7
|
+
export * from './models/ServiceTypeModel';
|
|
8
|
+
export * from './models/CAAServices';
|
|
9
|
+
export * from './models/CAASubServices';
|
|
10
|
+
export * from './models/ITApprovalSettings';
|
|
11
|
+
// export * from './models/Workflows';
|
|
12
|
+
export * from './models/ItApprovalsModel';
|
|
13
|
+
export * from './models/ItWorkflowModel';
|
|
14
|
+
export * from './models/WorkflowDefinitions';
|
|
15
|
+
export * from './models/WorkflowTask';
|
|
16
|
+
export * from './models/DepartmentsModel';
|
|
17
|
+
export * from './models/SectionModel';
|
|
18
|
+
export * from './models/WorkflowHierarchy';
|
|
19
|
+
export * from './models/WorkflowTaskNames';
|
|
20
|
+
export * from './models/DirectorateModel';
|
|
21
|
+
export * from './models/PositionModel';
|
|
22
|
+
export * from './models/serviceBookmarksModel';
|
|
23
|
+
export * from './models/contactInfoModel';
|
|
24
|
+
export * from './models/userRolesModel';
|
|
25
|
+
export * from './models/roleRightsModel';
|
|
26
|
+
export * from './models/NotificationModel';
|
|
27
|
+
export * from './models/ITRequestChatModel';
|
|
28
|
+
export * from './models/ITRequestAttachmentModel';
|
|
29
|
+
export * from './models/LogisticsModel';
|
|
30
|
+
export * from './models/LogisticsApprovalModel';
|
|
31
|
+
export * from './models/LogisticsChatModel';
|
|
32
|
+
export * from './models/LogisticsAttachmentModel';
|
|
33
|
+
export * from './models/LogisticsWorkflowModel';
|
package/src/models/BaseModel.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import moment from "moment-timezone";
|
|
2
|
-
import {
|
|
3
|
-
Column,
|
|
4
|
-
CreateDateColumn,
|
|
5
|
-
UpdateDateColumn,
|
|
6
|
-
BeforeInsert,
|
|
7
|
-
PrimaryGeneratedColumn
|
|
8
|
-
} from 'typeorm';
|
|
9
|
-
|
|
10
|
-
export abstract class Model0 {
|
|
11
|
-
jsonIgnore: string[] = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'integer', nullable: true })
|
|
14
|
-
created_by?: number;
|
|
15
|
-
|
|
16
|
-
@CreateDateColumn({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" })
|
|
17
|
-
created_at?: Date;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
updated_by?: number;
|
|
21
|
-
|
|
22
|
-
@UpdateDateColumn({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" })
|
|
23
|
-
updated_at?: Date;
|
|
24
|
-
|
|
25
|
-
@BeforeInsert()
|
|
26
|
-
insertCreated() {
|
|
27
|
-
const currentTime = moment().utc().tz('Asia/Kolkata').toDate();
|
|
28
|
-
this.created_at = currentTime;
|
|
29
|
-
this.updated_at = currentTime;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@Column({ nullable: true, default: false })
|
|
33
|
-
is_deleted?: boolean = false;
|
|
34
|
-
|
|
35
|
-
constructor() {
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export abstract class BaseModel extends Model0 {
|
|
40
|
-
@PrimaryGeneratedColumn()
|
|
41
|
-
id: number;
|
|
42
|
-
|
|
43
|
-
constructor() {
|
|
44
|
-
super();
|
|
45
|
-
this.id = 0; // This will be set by the database when the entity is saved
|
|
46
|
-
}
|
|
1
|
+
import moment from "moment-timezone";
|
|
2
|
+
import {
|
|
3
|
+
Column,
|
|
4
|
+
CreateDateColumn,
|
|
5
|
+
UpdateDateColumn,
|
|
6
|
+
BeforeInsert,
|
|
7
|
+
PrimaryGeneratedColumn
|
|
8
|
+
} from 'typeorm';
|
|
9
|
+
|
|
10
|
+
export abstract class Model0 {
|
|
11
|
+
jsonIgnore: string[] = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
created_by?: number;
|
|
15
|
+
|
|
16
|
+
@CreateDateColumn({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" })
|
|
17
|
+
created_at?: Date;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
updated_by?: number;
|
|
21
|
+
|
|
22
|
+
@UpdateDateColumn({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" })
|
|
23
|
+
updated_at?: Date;
|
|
24
|
+
|
|
25
|
+
@BeforeInsert()
|
|
26
|
+
insertCreated() {
|
|
27
|
+
const currentTime = moment().utc().tz('Asia/Kolkata').toDate();
|
|
28
|
+
this.created_at = currentTime;
|
|
29
|
+
this.updated_at = currentTime;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Column({ nullable: true, default: false })
|
|
33
|
+
is_deleted?: boolean = false;
|
|
34
|
+
|
|
35
|
+
constructor() {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export abstract class BaseModel extends Model0 {
|
|
40
|
+
@PrimaryGeneratedColumn()
|
|
41
|
+
id: number;
|
|
42
|
+
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.id = 0; // This will be set by the database when the entity is saved
|
|
46
|
+
}
|
|
47
47
|
}
|
|
@@ -1,115 +1,115 @@
|
|
|
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: "date", nullable: false })
|
|
54
|
-
request_date: Date;
|
|
55
|
-
|
|
56
|
-
@Column({ nullable: true })
|
|
57
|
-
attachment_url: string;
|
|
58
|
-
|
|
59
|
-
@Column({ nullable: false })
|
|
60
|
-
user_id: number;
|
|
61
|
-
|
|
62
|
-
@Column({ nullable: true })
|
|
63
|
-
reporting_manager: number;
|
|
64
|
-
|
|
65
|
-
@Column({ nullable: true })
|
|
66
|
-
assigned_to: number;
|
|
67
|
-
|
|
68
|
-
@Column({
|
|
69
|
-
type: "enum",
|
|
70
|
-
enum: status,
|
|
71
|
-
default: status.PENDING,
|
|
72
|
-
nullable: false,
|
|
73
|
-
})
|
|
74
|
-
status: status;
|
|
75
|
-
|
|
76
|
-
@Column({ type: "varchar", nullable: true })
|
|
77
|
-
workflow_execution_id: string | null;
|
|
78
|
-
|
|
79
|
-
constructor(
|
|
80
|
-
service_id: number,
|
|
81
|
-
sub_service_id: number,
|
|
82
|
-
problem: string,
|
|
83
|
-
request_for: ContactFor,
|
|
84
|
-
description: string,
|
|
85
|
-
extn_num: string,
|
|
86
|
-
contact_num: string,
|
|
87
|
-
request_date: Date,
|
|
88
|
-
attachment_url: string,
|
|
89
|
-
reporting_manager: number,
|
|
90
|
-
assigned_to: number,
|
|
91
|
-
status: status,
|
|
92
|
-
workflow_execution_id?: string,
|
|
93
|
-
req_user_department_id?: number | null,
|
|
94
|
-
req_user_section_id?: number | null,
|
|
95
|
-
service_type_id?: number | null
|
|
96
|
-
) {
|
|
97
|
-
super();
|
|
98
|
-
this.service_id = service_id;
|
|
99
|
-
this.sub_service_id = sub_service_id;
|
|
100
|
-
this.problem = problem;
|
|
101
|
-
this.request_for = request_for;
|
|
102
|
-
this.description = description;
|
|
103
|
-
this.extn_num = extn_num;
|
|
104
|
-
this.contact_num = contact_num;
|
|
105
|
-
this.request_date = request_date;
|
|
106
|
-
this.attachment_url = attachment_url;
|
|
107
|
-
this.reporting_manager = reporting_manager;
|
|
108
|
-
this.assigned_to = assigned_to;
|
|
109
|
-
this.status = status;
|
|
110
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
111
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
112
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
113
|
-
this.service_type_id = service_type_id || null;
|
|
114
|
-
}
|
|
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: "date", nullable: false })
|
|
54
|
+
request_date: Date;
|
|
55
|
+
|
|
56
|
+
@Column({ nullable: true })
|
|
57
|
+
attachment_url: string;
|
|
58
|
+
|
|
59
|
+
@Column({ nullable: false })
|
|
60
|
+
user_id: number;
|
|
61
|
+
|
|
62
|
+
@Column({ nullable: true })
|
|
63
|
+
reporting_manager: number;
|
|
64
|
+
|
|
65
|
+
@Column({ nullable: true })
|
|
66
|
+
assigned_to: number;
|
|
67
|
+
|
|
68
|
+
@Column({
|
|
69
|
+
type: "enum",
|
|
70
|
+
enum: status,
|
|
71
|
+
default: status.PENDING,
|
|
72
|
+
nullable: false,
|
|
73
|
+
})
|
|
74
|
+
status: status;
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", nullable: true })
|
|
77
|
+
workflow_execution_id: string | null;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
service_id: number,
|
|
81
|
+
sub_service_id: number,
|
|
82
|
+
problem: string,
|
|
83
|
+
request_for: ContactFor,
|
|
84
|
+
description: string,
|
|
85
|
+
extn_num: string,
|
|
86
|
+
contact_num: string,
|
|
87
|
+
request_date: Date,
|
|
88
|
+
attachment_url: string,
|
|
89
|
+
reporting_manager: number,
|
|
90
|
+
assigned_to: number,
|
|
91
|
+
status: status,
|
|
92
|
+
workflow_execution_id?: string,
|
|
93
|
+
req_user_department_id?: number | null,
|
|
94
|
+
req_user_section_id?: number | null,
|
|
95
|
+
service_type_id?: number | null
|
|
96
|
+
) {
|
|
97
|
+
super();
|
|
98
|
+
this.service_id = service_id;
|
|
99
|
+
this.sub_service_id = sub_service_id;
|
|
100
|
+
this.problem = problem;
|
|
101
|
+
this.request_for = request_for;
|
|
102
|
+
this.description = description;
|
|
103
|
+
this.extn_num = extn_num;
|
|
104
|
+
this.contact_num = contact_num;
|
|
105
|
+
this.request_date = request_date;
|
|
106
|
+
this.attachment_url = attachment_url;
|
|
107
|
+
this.reporting_manager = reporting_manager;
|
|
108
|
+
this.assigned_to = assigned_to;
|
|
109
|
+
this.status = status;
|
|
110
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
111
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
112
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
113
|
+
this.service_type_id = service_type_id || null;
|
|
114
|
+
}
|
|
115
115
|
}
|