@platform-modules/civil-aviation-authority 2.2.311 → 2.2.312
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 +2 -9
- package/dist/data-source.js +1 -9
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -4
- package/dist/models/HrServiceApprovalModel.js +1 -1
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/data-source.ts +1 -9
- package/src/index.ts +0 -4
- package/src/models/HrServiceApprovalModel.ts +1 -1
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/dist/models/TrainingApprovalModel.d.ts +0 -25
- package/dist/models/TrainingApprovalModel.js +0 -107
- package/dist/models/TrainingAttachmentModel.d.ts +0 -13
- package/dist/models/TrainingAttachmentModel.js +0 -69
- package/dist/models/TrainingChatModel.d.ts +0 -28
- package/dist/models/TrainingChatModel.js +0 -96
- package/dist/models/TrainingWorkflowModel.d.ts +0 -19
- package/dist/models/TrainingWorkflowModel.js +0 -81
- package/src/models/TrainingApprovalModel.ts +0 -94
- package/src/models/TrainingAttachmentModel.ts +0 -56
- package/src/models/TrainingChatModel.ts +0 -83
- package/src/models/TrainingWorkflowModel.ts +0 -68
package/.env
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
# DB_HOST=164.52.222.169
|
|
2
|
-
# DB_PORT=5432
|
|
3
|
-
# DB_USER=postgres_admin_user
|
|
4
|
-
# DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
5
|
-
# DB_NAME=CAA
|
|
6
|
-
|
|
7
|
-
|
|
8
1
|
DB_HOST=localhost
|
|
9
|
-
DB_PORT=
|
|
2
|
+
DB_PORT=5433
|
|
10
3
|
DB_USER=postgres
|
|
11
|
-
DB_PASS=
|
|
4
|
+
DB_PASS=123
|
|
12
5
|
DB_NAME=CAA
|
package/dist/data-source.js
CHANGED
|
@@ -82,10 +82,6 @@ const HrServiceWorkflowModel_1 = require("./models/HrServiceWorkflowModel");
|
|
|
82
82
|
const HrServiceAttachmentModel_1 = require("./models/HrServiceAttachmentModel");
|
|
83
83
|
const HrServiceChatModel_1 = require("./models/HrServiceChatModel");
|
|
84
84
|
const TrainingRequestModel_1 = require("./models/TrainingRequestModel");
|
|
85
|
-
const TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
|
|
86
|
-
const TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
|
|
87
|
-
const TrainingChatModel_1 = require("./models/TrainingChatModel");
|
|
88
|
-
const TrainingAttachmentModel_1 = require("./models/TrainingAttachmentModel");
|
|
89
85
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
90
86
|
type: 'postgres',
|
|
91
87
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -171,10 +167,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
171
167
|
HrServiceWorkflowModel_1.HrServiceWorkFlow,
|
|
172
168
|
HrServiceAttachmentModel_1.HrServiceRequestAttachment,
|
|
173
169
|
HrServiceChatModel_1.HrServiceRequestChat,
|
|
174
|
-
TrainingRequestModel_1.TrainingRequest
|
|
175
|
-
TrainingWorkflowModel_1.TrainingWorkFlow,
|
|
176
|
-
TrainingApprovalModel_1.TrainingApprovalDetails,
|
|
177
|
-
TrainingChatModel_1.TrainingRequestChat,
|
|
178
|
-
TrainingAttachmentModel_1.TrainingRequestAttachment
|
|
170
|
+
TrainingRequestModel_1.TrainingRequest
|
|
179
171
|
],
|
|
180
172
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -71,10 +71,6 @@ export * from './models/HrServiceWorkflowModel';
|
|
|
71
71
|
export * from './models/HrServiceAttachmentModel';
|
|
72
72
|
export * from './models/HrServiceChatModel';
|
|
73
73
|
export * from './models/TrainingRequestModel';
|
|
74
|
-
export * from './models/TrainingWorkflowModel';
|
|
75
|
-
export * from './models/TrainingApprovalModel';
|
|
76
|
-
export * from './models/TrainingChatModel';
|
|
77
|
-
export * from './models/TrainingAttachmentModel';
|
|
78
74
|
export { HrServiceRequestStatus } from './models/HrServiceRequestModel';
|
|
79
75
|
export { HrServiceApprovalStatus } from './models/HrServiceApprovalModel';
|
|
80
76
|
export { HrServiceWorkFlowStatus } from './models/HrServiceWorkflowModel';
|
package/dist/index.js
CHANGED
|
@@ -92,10 +92,6 @@ __exportStar(require("./models/HrServiceWorkflowModel"), exports);
|
|
|
92
92
|
__exportStar(require("./models/HrServiceAttachmentModel"), exports);
|
|
93
93
|
__exportStar(require("./models/HrServiceChatModel"), exports);
|
|
94
94
|
__exportStar(require("./models/TrainingRequestModel"), exports);
|
|
95
|
-
__exportStar(require("./models/TrainingWorkflowModel"), exports);
|
|
96
|
-
__exportStar(require("./models/TrainingApprovalModel"), exports);
|
|
97
|
-
__exportStar(require("./models/TrainingChatModel"), exports);
|
|
98
|
-
__exportStar(require("./models/TrainingAttachmentModel"), exports);
|
|
99
95
|
var HrServiceRequestModel_1 = require("./models/HrServiceRequestModel");
|
|
100
96
|
Object.defineProperty(exports, "HrServiceRequestStatus", { enumerable: true, get: function () { return HrServiceRequestModel_1.HrServiceRequestStatus; } });
|
|
101
97
|
var HrServiceApprovalModel_1 = require("./models/HrServiceApprovalModel");
|
|
@@ -94,7 +94,7 @@ __decorate([
|
|
|
94
94
|
__metadata("design:type", String)
|
|
95
95
|
], HrServiceApprovalDetails.prototype, "approval_status", void 0);
|
|
96
96
|
__decorate([
|
|
97
|
-
(0, typeorm_1.Column)({ type: "boolean", default:
|
|
97
|
+
(0, typeorm_1.Column)({ type: "boolean", default: null, nullable: true }),
|
|
98
98
|
__metadata("design:type", Boolean)
|
|
99
99
|
], HrServiceApprovalDetails.prototype, "is_manager", void 0);
|
|
100
100
|
__decorate([
|
|
@@ -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,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,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);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Workflows extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
service_id: number;
|
|
5
|
+
sub_service_id: number;
|
|
6
|
+
request_for: string;
|
|
7
|
+
levels: number;
|
|
8
|
+
constructor(name: string, service_id: number, sub_service_id: number, request_for: string, levels: number);
|
|
9
|
+
}
|
|
@@ -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
package/src/data-source.ts
CHANGED
|
@@ -80,10 +80,6 @@ import { HrServiceWorkFlow } from './models/HrServiceWorkflowModel';
|
|
|
80
80
|
import { HrServiceRequestAttachment } from './models/HrServiceAttachmentModel';
|
|
81
81
|
import { HrServiceRequestChat } from './models/HrServiceChatModel';
|
|
82
82
|
import { TrainingRequest } from './models/TrainingRequestModel';
|
|
83
|
-
import { TrainingWorkFlow } from './models/TrainingWorkflowModel';
|
|
84
|
-
import { TrainingApprovalDetails } from './models/TrainingApprovalModel';
|
|
85
|
-
import { TrainingRequestChat } from './models/TrainingChatModel';
|
|
86
|
-
import { TrainingRequestAttachment } from './models/TrainingAttachmentModel';
|
|
87
83
|
|
|
88
84
|
export const AppDataSource = new DataSource({
|
|
89
85
|
type: 'postgres',
|
|
@@ -170,10 +166,6 @@ export const AppDataSource = new DataSource({
|
|
|
170
166
|
HrServiceWorkFlow,
|
|
171
167
|
HrServiceRequestAttachment,
|
|
172
168
|
HrServiceRequestChat,
|
|
173
|
-
TrainingRequest
|
|
174
|
-
TrainingWorkFlow,
|
|
175
|
-
TrainingApprovalDetails,
|
|
176
|
-
TrainingRequestChat,
|
|
177
|
-
TrainingRequestAttachment
|
|
169
|
+
TrainingRequest
|
|
178
170
|
],
|
|
179
171
|
});
|
package/src/index.ts
CHANGED
|
@@ -75,10 +75,6 @@ export * from './models/HrServiceWorkflowModel';
|
|
|
75
75
|
export * from './models/HrServiceAttachmentModel';
|
|
76
76
|
export * from './models/HrServiceChatModel';
|
|
77
77
|
export * from './models/TrainingRequestModel';
|
|
78
|
-
export * from './models/TrainingWorkflowModel';
|
|
79
|
-
export * from './models/TrainingApprovalModel';
|
|
80
|
-
export * from './models/TrainingChatModel';
|
|
81
|
-
export * from './models/TrainingAttachmentModel';
|
|
82
78
|
export {HrServiceRequestStatus} from './models/HrServiceRequestModel';
|
|
83
79
|
export {HrServiceApprovalStatus} from './models/HrServiceApprovalModel';
|
|
84
80
|
export {HrServiceWorkFlowStatus} from './models/HrServiceWorkflowModel';
|
|
@@ -52,7 +52,7 @@ export class HrServiceApprovalDetails extends BaseModel {
|
|
|
52
52
|
})
|
|
53
53
|
approval_status: HrServiceApprovalStatus;
|
|
54
54
|
|
|
55
|
-
@Column({ type: "boolean", default:
|
|
55
|
+
@Column({ type: "boolean", default: null, nullable: true })
|
|
56
56
|
is_manager: boolean;
|
|
57
57
|
|
|
58
58
|
@Column({ type: "boolean", default: true, nullable: false })
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_chat' })
|
|
7
|
-
export class ITRequestChat extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_chat' })
|
|
7
|
+
export class ITRequestChat extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export enum ApprovalStatus {
|
|
6
|
-
PENDING = "Pending",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected",
|
|
9
|
-
ASSIGNED = "Assigned",
|
|
10
|
-
REASSIGNED = "Reassigned"
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Entity({ name: 'it_approvals' })
|
|
15
|
-
export class ItApprovalDetails extends BaseModel {
|
|
16
|
-
@Column({ type: 'integer', nullable: false })
|
|
17
|
-
request_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: true })
|
|
23
|
-
sub_service_id: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'integer', nullable: false })
|
|
26
|
-
level: number;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
approver_user_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
delegation_user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: false })
|
|
35
|
-
approver_role_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'integer', nullable: true })
|
|
41
|
-
section_id: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'integer', nullable: true })
|
|
44
|
-
approved_by: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
-
comment: string;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
-
approval_status: ApprovalStatus;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
-
is_allowed: boolean;
|
|
54
|
-
|
|
55
|
-
constructor(
|
|
56
|
-
request_id: number,
|
|
57
|
-
approver_user_id: number | null,
|
|
58
|
-
approver_role_id: number | null,
|
|
59
|
-
comment: string,
|
|
60
|
-
approval_status: ApprovalStatus,
|
|
61
|
-
level: number,
|
|
62
|
-
department_id?: number | null,
|
|
63
|
-
section_id?: number | null,
|
|
64
|
-
approved_by?: number | null,
|
|
65
|
-
service_id?: number | null,
|
|
66
|
-
sub_service_id?: number | null,
|
|
67
|
-
delegation_user_id?: number | null,
|
|
68
|
-
is_allowed?: boolean
|
|
69
|
-
) {
|
|
70
|
-
super();
|
|
71
|
-
this.request_id = request_id;
|
|
72
|
-
this.approver_user_id = approver_user_id;
|
|
73
|
-
this.approver_role_id = approver_role_id;
|
|
74
|
-
this.comment = comment;
|
|
75
|
-
this.approval_status = approval_status;
|
|
76
|
-
this.level = level;
|
|
77
|
-
this.department_id = department_id || null;
|
|
78
|
-
this.section_id = section_id || null;
|
|
79
|
-
this.approved_by = approved_by || null;
|
|
80
|
-
this.service_id = service_id ?? null;
|
|
81
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
-
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
-
this.is_allowed = is_allowed ?? true;
|
|
84
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export enum ApprovalStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
ASSIGNED = "Assigned",
|
|
10
|
+
REASSIGNED = "Reassigned"
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Entity({ name: 'it_approvals' })
|
|
15
|
+
export class ItApprovalDetails extends BaseModel {
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
request_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: true })
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
26
|
+
level: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
approver_user_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
delegation_user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: false })
|
|
35
|
+
approver_role_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
section_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'integer', nullable: true })
|
|
44
|
+
approved_by: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
+
comment: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
+
approval_status: ApprovalStatus;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
+
is_allowed: boolean;
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
request_id: number,
|
|
57
|
+
approver_user_id: number | null,
|
|
58
|
+
approver_role_id: number | null,
|
|
59
|
+
comment: string,
|
|
60
|
+
approval_status: ApprovalStatus,
|
|
61
|
+
level: number,
|
|
62
|
+
department_id?: number | null,
|
|
63
|
+
section_id?: number | null,
|
|
64
|
+
approved_by?: number | null,
|
|
65
|
+
service_id?: number | null,
|
|
66
|
+
sub_service_id?: number | null,
|
|
67
|
+
delegation_user_id?: number | null,
|
|
68
|
+
is_allowed?: boolean
|
|
69
|
+
) {
|
|
70
|
+
super();
|
|
71
|
+
this.request_id = request_id;
|
|
72
|
+
this.approver_user_id = approver_user_id;
|
|
73
|
+
this.approver_role_id = approver_role_id;
|
|
74
|
+
this.comment = comment;
|
|
75
|
+
this.approval_status = approval_status;
|
|
76
|
+
this.level = level;
|
|
77
|
+
this.department_id = department_id || null;
|
|
78
|
+
this.section_id = section_id || null;
|
|
79
|
+
this.approved_by = approved_by || null;
|
|
80
|
+
this.service_id = service_id ?? null;
|
|
81
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
+
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
+
this.is_allowed = is_allowed ?? true;
|
|
84
|
+
}
|
|
85
85
|
}
|