@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
package/.env
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
DB_HOST=
|
|
2
|
-
DB_PORT=
|
|
3
|
-
DB_USER=
|
|
4
|
-
DB_PASS=
|
|
1
|
+
DB_HOST=localhost
|
|
2
|
+
DB_PORT=5433
|
|
3
|
+
DB_USER=postgres
|
|
4
|
+
DB_PASS=123
|
|
5
5
|
DB_NAME=CAA
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
7
|
+
# DB_HOST=164.52.222.169
|
|
8
|
+
# DB_PORT=5432
|
|
9
|
+
# DB_USER=postgres_admin_user
|
|
10
|
+
# DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
11
|
+
# DB_NAME=CAA
|
package/dist/data-source.js
CHANGED
|
@@ -33,6 +33,11 @@ const roleRightsModel_1 = require("./models/roleRightsModel");
|
|
|
33
33
|
const NotificationModel_1 = require("./models/NotificationModel");
|
|
34
34
|
const ITRequestChatModel_1 = require("./models/ITRequestChatModel");
|
|
35
35
|
const ITRequestAttachmentModel_1 = require("./models/ITRequestAttachmentModel");
|
|
36
|
+
const LogisticsModel_1 = require("./models/LogisticsModel");
|
|
37
|
+
const LogisticsApprovalModel_1 = require("./models/LogisticsApprovalModel");
|
|
38
|
+
const LogisticsChatModel_1 = require("./models/LogisticsChatModel");
|
|
39
|
+
const LogisticsAttachmentModel_1 = require("./models/LogisticsAttachmentModel");
|
|
40
|
+
const LogisticsWorkflowModel_1 = require("./models/LogisticsWorkflowModel");
|
|
36
41
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
37
42
|
type: 'postgres',
|
|
38
43
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -69,6 +74,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
69
74
|
roleRightsModel_1.RoleRights,
|
|
70
75
|
NotificationModel_1.Notification,
|
|
71
76
|
ITRequestChatModel_1.ITRequestChat,
|
|
72
|
-
ITRequestAttachmentModel_1.ITRequestAttachment
|
|
77
|
+
ITRequestAttachmentModel_1.ITRequestAttachment,
|
|
78
|
+
LogisticsModel_1.LogisticsRequests,
|
|
79
|
+
LogisticsApprovalModel_1.LogisticsApprovalDetails,
|
|
80
|
+
LogisticsChatModel_1.LogisticsRequestChat,
|
|
81
|
+
LogisticsAttachmentModel_1.LogisticsRequestAttachment,
|
|
82
|
+
LogisticsWorkflowModel_1.LogisticsWorkFlow
|
|
73
83
|
],
|
|
74
84
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -25,3 +25,8 @@ export * from './models/roleRightsModel';
|
|
|
25
25
|
export * from './models/NotificationModel';
|
|
26
26
|
export * from './models/ITRequestChatModel';
|
|
27
27
|
export * from './models/ITRequestAttachmentModel';
|
|
28
|
+
export * from './models/LogisticsModel';
|
|
29
|
+
export * from './models/LogisticsApprovalModel';
|
|
30
|
+
export * from './models/LogisticsChatModel';
|
|
31
|
+
export * from './models/LogisticsAttachmentModel';
|
|
32
|
+
export * from './models/LogisticsWorkflowModel';
|
package/dist/index.js
CHANGED
|
@@ -42,3 +42,8 @@ __exportStar(require("./models/roleRightsModel"), exports);
|
|
|
42
42
|
__exportStar(require("./models/NotificationModel"), exports);
|
|
43
43
|
__exportStar(require("./models/ITRequestChatModel"), exports);
|
|
44
44
|
__exportStar(require("./models/ITRequestAttachmentModel"), exports);
|
|
45
|
+
__exportStar(require("./models/LogisticsModel"), exports);
|
|
46
|
+
__exportStar(require("./models/LogisticsApprovalModel"), exports);
|
|
47
|
+
__exportStar(require("./models/LogisticsChatModel"), exports);
|
|
48
|
+
__exportStar(require("./models/LogisticsAttachmentModel"), exports);
|
|
49
|
+
__exportStar(require("./models/LogisticsWorkflowModel"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
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.ITServicesTypes = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypes = class ITServicesTypes extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.ITServicesTypes = ITServicesTypes;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ITServicesTypes.prototype, "name", void 0);
|
|
26
|
+
exports.ITServicesTypes = ITServicesTypes = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ name: 'IT_Services_Types' }),
|
|
28
|
+
__metadata("design:paramtypes", [String])
|
|
29
|
+
], ITServicesTypes);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum LogisticsApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
APPROVED = "Approved",
|
|
5
|
+
REJECTED = "Rejected"
|
|
6
|
+
}
|
|
7
|
+
export declare class LogisticsApprovalDetails extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
level: number;
|
|
12
|
+
approver_role_id: number;
|
|
13
|
+
department_id: number | null;
|
|
14
|
+
section_id: number | null;
|
|
15
|
+
approved_by: number | null;
|
|
16
|
+
comment: string;
|
|
17
|
+
approval_status: LogisticsApprovalStatus;
|
|
18
|
+
constructor(request_id: number, approver_role_id: number, comment: string, approval_status: LogisticsApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number);
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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.LogisticsApprovalDetails = exports.LogisticsApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var LogisticsApprovalStatus;
|
|
16
|
+
(function (LogisticsApprovalStatus) {
|
|
17
|
+
LogisticsApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
LogisticsApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
+
LogisticsApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
+
})(LogisticsApprovalStatus || (exports.LogisticsApprovalStatus = LogisticsApprovalStatus = {}));
|
|
21
|
+
let LogisticsApprovalDetails = class LogisticsApprovalDetails extends BaseModel_1.BaseModel {
|
|
22
|
+
constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, service_id, sub_service_id) {
|
|
23
|
+
super();
|
|
24
|
+
this.request_id = request_id;
|
|
25
|
+
this.service_id = service_id || null;
|
|
26
|
+
this.sub_service_id = sub_service_id || null;
|
|
27
|
+
this.approver_role_id = approver_role_id;
|
|
28
|
+
this.comment = comment;
|
|
29
|
+
this.approval_status = approval_status;
|
|
30
|
+
this.level = level;
|
|
31
|
+
this.department_id = department_id || null;
|
|
32
|
+
this.section_id = section_id || null;
|
|
33
|
+
this.approved_by = approved_by || null;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.LogisticsApprovalDetails = LogisticsApprovalDetails;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], LogisticsApprovalDetails.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LogisticsApprovalDetails.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], LogisticsApprovalDetails.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], LogisticsApprovalDetails.prototype, "level", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], LogisticsApprovalDetails.prototype, "approver_role_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], LogisticsApprovalDetails.prototype, "department_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], LogisticsApprovalDetails.prototype, "section_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], LogisticsApprovalDetails.prototype, "approved_by", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], LogisticsApprovalDetails.prototype, "comment", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: LogisticsApprovalStatus, default: LogisticsApprovalStatus.PENDING, nullable: false }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], LogisticsApprovalDetails.prototype, "approval_status", void 0);
|
|
77
|
+
exports.LogisticsApprovalDetails = LogisticsApprovalDetails = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)({ name: 'logistics_approvals' }),
|
|
79
|
+
__metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object, Number, Number])
|
|
80
|
+
], LogisticsApprovalDetails);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class LogisticsRequestAttachment extends BaseModel {
|
|
3
|
+
request_id: number;
|
|
4
|
+
service_id: number | null;
|
|
5
|
+
sub_service_id: number | null;
|
|
6
|
+
file_url: string;
|
|
7
|
+
file_name: string;
|
|
8
|
+
file_type: string;
|
|
9
|
+
file_size: number | null;
|
|
10
|
+
constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number);
|
|
11
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.LogisticsRequestAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let LogisticsRequestAttachment = class LogisticsRequestAttachment extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(request_id, file_url, file_name, file_type, file_size, service_id, sub_service_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.request_id = request_id;
|
|
19
|
+
this.service_id = service_id || null;
|
|
20
|
+
this.sub_service_id = sub_service_id || null;
|
|
21
|
+
this.file_url = file_url;
|
|
22
|
+
this.file_name = file_name || '';
|
|
23
|
+
this.file_type = file_type || '';
|
|
24
|
+
this.file_size = file_size || null;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.LogisticsRequestAttachment = LogisticsRequestAttachment;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], LogisticsRequestAttachment.prototype, "request_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], LogisticsRequestAttachment.prototype, "service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], LogisticsRequestAttachment.prototype, "sub_service_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], LogisticsRequestAttachment.prototype, "file_url", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], LogisticsRequestAttachment.prototype, "file_name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], LogisticsRequestAttachment.prototype, "file_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], LogisticsRequestAttachment.prototype, "file_size", void 0);
|
|
56
|
+
exports.LogisticsRequestAttachment = LogisticsRequestAttachment = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)({ name: 'logistics_request_attachments' }),
|
|
58
|
+
__metadata("design:paramtypes", [Number, String, String, String, Number, Number, Number])
|
|
59
|
+
], LogisticsRequestAttachment);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum MessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare class LogisticsRequestChat extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
user_id: number;
|
|
14
|
+
message: string;
|
|
15
|
+
messageType: MessageType;
|
|
16
|
+
constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: MessageType);
|
|
17
|
+
}
|
|
@@ -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.LogisticsRequestChat = exports.MessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var MessageType;
|
|
16
|
+
(function (MessageType) {
|
|
17
|
+
MessageType["TEXT"] = "text";
|
|
18
|
+
MessageType["IMAGE"] = "image";
|
|
19
|
+
MessageType["VIDEO"] = "video";
|
|
20
|
+
MessageType["FILE"] = "file";
|
|
21
|
+
MessageType["LINK"] = "link";
|
|
22
|
+
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
23
|
+
let LogisticsRequestChat = class LogisticsRequestChat extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(request_id, user_id, message, service_id, sub_service_id, messageType) {
|
|
25
|
+
super();
|
|
26
|
+
this.request_id = request_id;
|
|
27
|
+
this.service_id = service_id || null;
|
|
28
|
+
this.sub_service_id = sub_service_id || null;
|
|
29
|
+
this.user_id = user_id;
|
|
30
|
+
this.message = message;
|
|
31
|
+
this.messageType = messageType || MessageType.TEXT;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.LogisticsRequestChat = LogisticsRequestChat;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], LogisticsRequestChat.prototype, "request_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], LogisticsRequestChat.prototype, "service_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], LogisticsRequestChat.prototype, "sub_service_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], LogisticsRequestChat.prototype, "user_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], LogisticsRequestChat.prototype, "message", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
type: 'enum',
|
|
58
|
+
enum: MessageType,
|
|
59
|
+
default: MessageType.TEXT,
|
|
60
|
+
nullable: false
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], LogisticsRequestChat.prototype, "messageType", void 0);
|
|
64
|
+
exports.LogisticsRequestChat = LogisticsRequestChat = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: 'logistics_request_chat' }),
|
|
66
|
+
__metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
|
|
67
|
+
], LogisticsRequestChat);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum Request_Type {
|
|
3
|
+
DAILY = "Daily",
|
|
4
|
+
EMERGENCY = "Emergency"
|
|
5
|
+
}
|
|
6
|
+
export declare enum Status {
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
ASSIGNED = "Assigned",
|
|
9
|
+
IN_PROGRESS = "In Progress",
|
|
10
|
+
APPROVED = "Approved",
|
|
11
|
+
REJECTED = "Rejected"
|
|
12
|
+
}
|
|
13
|
+
export declare enum Vehicle_Required_For {
|
|
14
|
+
CONFERENCES = "Conferences",
|
|
15
|
+
CELEBRATIONS = "Celebrations and Official Meetings",
|
|
16
|
+
OTHERS = "Others"
|
|
17
|
+
}
|
|
18
|
+
export declare enum Vehicle_Required_Location {
|
|
19
|
+
INSIDE = "Inside Muscat",
|
|
20
|
+
OUTSIDE = "Outside Muscat"
|
|
21
|
+
}
|
|
22
|
+
export declare enum Purpose_of_Travel {
|
|
23
|
+
SITE = "Site Visit",
|
|
24
|
+
AIRPORT = "Airport Duty",
|
|
25
|
+
OFFICIAL = "Official Meeting",
|
|
26
|
+
OTHER = "Other"
|
|
27
|
+
}
|
|
28
|
+
export declare enum Type_of_Vehicle {
|
|
29
|
+
SEDAN = "Sedan",
|
|
30
|
+
SUV = "SUV"
|
|
31
|
+
}
|
|
32
|
+
export declare class LogisticsRequests extends BaseModel {
|
|
33
|
+
req_user_department_id: number | null;
|
|
34
|
+
req_user_section_id: number | null;
|
|
35
|
+
service_id: number;
|
|
36
|
+
sub_service_id: number;
|
|
37
|
+
user_id: number;
|
|
38
|
+
request_type: Request_Type;
|
|
39
|
+
vehicle_required_for: Vehicle_Required_For;
|
|
40
|
+
vehicle_required_location: Vehicle_Required_Location;
|
|
41
|
+
title: string;
|
|
42
|
+
purpose_of_travel: Purpose_of_Travel;
|
|
43
|
+
type_of_vehicle_required: Type_of_Vehicle;
|
|
44
|
+
date_of_travel: Date;
|
|
45
|
+
time_of_travel: string;
|
|
46
|
+
exp_duration_of_use_hrs: number;
|
|
47
|
+
exp_duration_of_use_days: number;
|
|
48
|
+
description: string;
|
|
49
|
+
status: Status;
|
|
50
|
+
workflow_execution_id: string | null;
|
|
51
|
+
constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, request_type: Request_Type, vehicle_required_for: Vehicle_Required_For, vehicle_required_location: Vehicle_Required_Location, title: string, purpose_of_travel: Purpose_of_Travel, type_of_vehicle_required: Type_of_Vehicle, date_of_travel: Date, time_of_travel: string, exp_duration_of_use_hrs: number, exp_duration_of_use_days: number, description: string, status: Status, workflow_execution_id?: string | null);
|
|
52
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
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.LogisticsRequests = exports.Type_of_Vehicle = exports.Purpose_of_Travel = exports.Vehicle_Required_Location = exports.Vehicle_Required_For = exports.Status = exports.Request_Type = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var Request_Type;
|
|
16
|
+
(function (Request_Type) {
|
|
17
|
+
Request_Type["DAILY"] = "Daily";
|
|
18
|
+
Request_Type["EMERGENCY"] = "Emergency";
|
|
19
|
+
})(Request_Type || (exports.Request_Type = Request_Type = {}));
|
|
20
|
+
var Status;
|
|
21
|
+
(function (Status) {
|
|
22
|
+
Status["PENDING"] = "Pending";
|
|
23
|
+
Status["ASSIGNED"] = "Assigned";
|
|
24
|
+
Status["IN_PROGRESS"] = "In Progress";
|
|
25
|
+
Status["APPROVED"] = "Approved";
|
|
26
|
+
Status["REJECTED"] = "Rejected";
|
|
27
|
+
})(Status || (exports.Status = Status = {}));
|
|
28
|
+
var Vehicle_Required_For;
|
|
29
|
+
(function (Vehicle_Required_For) {
|
|
30
|
+
Vehicle_Required_For["CONFERENCES"] = "Conferences";
|
|
31
|
+
Vehicle_Required_For["CELEBRATIONS"] = "Celebrations and Official Meetings";
|
|
32
|
+
Vehicle_Required_For["OTHERS"] = "Others";
|
|
33
|
+
})(Vehicle_Required_For || (exports.Vehicle_Required_For = Vehicle_Required_For = {}));
|
|
34
|
+
var Vehicle_Required_Location;
|
|
35
|
+
(function (Vehicle_Required_Location) {
|
|
36
|
+
Vehicle_Required_Location["INSIDE"] = "Inside Muscat";
|
|
37
|
+
Vehicle_Required_Location["OUTSIDE"] = "Outside Muscat";
|
|
38
|
+
})(Vehicle_Required_Location || (exports.Vehicle_Required_Location = Vehicle_Required_Location = {}));
|
|
39
|
+
var Purpose_of_Travel;
|
|
40
|
+
(function (Purpose_of_Travel) {
|
|
41
|
+
Purpose_of_Travel["SITE"] = "Site Visit";
|
|
42
|
+
Purpose_of_Travel["AIRPORT"] = "Airport Duty";
|
|
43
|
+
Purpose_of_Travel["OFFICIAL"] = "Official Meeting";
|
|
44
|
+
Purpose_of_Travel["OTHER"] = "Other";
|
|
45
|
+
})(Purpose_of_Travel || (exports.Purpose_of_Travel = Purpose_of_Travel = {}));
|
|
46
|
+
var Type_of_Vehicle;
|
|
47
|
+
(function (Type_of_Vehicle) {
|
|
48
|
+
Type_of_Vehicle["SEDAN"] = "Sedan";
|
|
49
|
+
Type_of_Vehicle["SUV"] = "SUV";
|
|
50
|
+
})(Type_of_Vehicle || (exports.Type_of_Vehicle = Type_of_Vehicle = {}));
|
|
51
|
+
let LogisticsRequests = class LogisticsRequests extends BaseModel_1.BaseModel {
|
|
52
|
+
constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, request_type, vehicle_required_for, vehicle_required_location, title, purpose_of_travel, type_of_vehicle_required, date_of_travel, time_of_travel, exp_duration_of_use_hrs, exp_duration_of_use_days, description, status, workflow_execution_id) {
|
|
53
|
+
super();
|
|
54
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
55
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
56
|
+
this.service_id = service_id;
|
|
57
|
+
this.sub_service_id = sub_service_id;
|
|
58
|
+
this.user_id = user_id;
|
|
59
|
+
this.request_type = request_type;
|
|
60
|
+
this.vehicle_required_for = vehicle_required_for;
|
|
61
|
+
this.vehicle_required_location = vehicle_required_location;
|
|
62
|
+
this.title = title;
|
|
63
|
+
this.purpose_of_travel = purpose_of_travel;
|
|
64
|
+
this.type_of_vehicle_required = type_of_vehicle_required;
|
|
65
|
+
this.date_of_travel = date_of_travel;
|
|
66
|
+
this.time_of_travel = time_of_travel;
|
|
67
|
+
this.exp_duration_of_use_hrs = exp_duration_of_use_hrs;
|
|
68
|
+
this.exp_duration_of_use_days = exp_duration_of_use_days;
|
|
69
|
+
this.description = description;
|
|
70
|
+
this.status = status;
|
|
71
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.LogisticsRequests = LogisticsRequests;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], LogisticsRequests.prototype, "req_user_department_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], LogisticsRequests.prototype, "req_user_section_id", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
85
|
+
__metadata("design:type", Number)
|
|
86
|
+
], LogisticsRequests.prototype, "service_id", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], LogisticsRequests.prototype, "sub_service_id", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
93
|
+
__metadata("design:type", Number)
|
|
94
|
+
], LogisticsRequests.prototype, "user_id", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({
|
|
97
|
+
type: "enum",
|
|
98
|
+
enum: Request_Type,
|
|
99
|
+
default: Request_Type.DAILY,
|
|
100
|
+
nullable: false,
|
|
101
|
+
}),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], LogisticsRequests.prototype, "request_type", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({
|
|
106
|
+
type: "enum",
|
|
107
|
+
enum: Vehicle_Required_For,
|
|
108
|
+
default: Vehicle_Required_For.OTHERS,
|
|
109
|
+
nullable: false,
|
|
110
|
+
}),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], LogisticsRequests.prototype, "vehicle_required_for", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({
|
|
115
|
+
type: "enum",
|
|
116
|
+
enum: Vehicle_Required_Location,
|
|
117
|
+
default: Vehicle_Required_Location.INSIDE,
|
|
118
|
+
nullable: false,
|
|
119
|
+
}),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], LogisticsRequests.prototype, "vehicle_required_location", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], LogisticsRequests.prototype, "title", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({
|
|
128
|
+
type: "enum",
|
|
129
|
+
enum: Purpose_of_Travel,
|
|
130
|
+
default: Purpose_of_Travel.OTHER,
|
|
131
|
+
nullable: false,
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], LogisticsRequests.prototype, "purpose_of_travel", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.Column)({
|
|
137
|
+
type: "enum",
|
|
138
|
+
enum: Type_of_Vehicle,
|
|
139
|
+
default: Type_of_Vehicle.SEDAN,
|
|
140
|
+
nullable: false,
|
|
141
|
+
}),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], LogisticsRequests.prototype, "type_of_vehicle_required", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
146
|
+
__metadata("design:type", Date)
|
|
147
|
+
], LogisticsRequests.prototype, "date_of_travel", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.Column)({ type: "time", nullable: true }),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], LogisticsRequests.prototype, "time_of_travel", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
154
|
+
__metadata("design:type", Number)
|
|
155
|
+
], LogisticsRequests.prototype, "exp_duration_of_use_hrs", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
158
|
+
__metadata("design:type", Number)
|
|
159
|
+
], LogisticsRequests.prototype, "exp_duration_of_use_days", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], LogisticsRequests.prototype, "description", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.Column)({
|
|
166
|
+
type: "enum",
|
|
167
|
+
enum: Status,
|
|
168
|
+
default: Status.PENDING,
|
|
169
|
+
nullable: false,
|
|
170
|
+
}),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], LogisticsRequests.prototype, "status", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
175
|
+
__metadata("design:type", Object)
|
|
176
|
+
], LogisticsRequests.prototype, "workflow_execution_id", void 0);
|
|
177
|
+
exports.LogisticsRequests = LogisticsRequests = __decorate([
|
|
178
|
+
(0, typeorm_1.Entity)({ name: 'logistics_requests' }),
|
|
179
|
+
__metadata("design:paramtypes", [Object, Object, Number, Number, Number, String, String, String, String, String, String, Date, String, Number, Number, String, String, Object])
|
|
180
|
+
], LogisticsRequests);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum LogisticsWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class LogisticsWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: LogisticsWorkFlowStatus;
|
|
13
|
+
constructor(request_id: number, content: string, status: LogisticsWorkFlowStatus, service_id?: number, sub_service_id?: number);
|
|
14
|
+
}
|