@platform-modules/foreign-ministry 1.1.106 → 1.1.107
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/data-source.js +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/RequestParcelApprovalModel.d.ts +22 -0
- package/dist/models/RequestParcelApprovalModel.js +79 -0
- package/dist/models/RequestParcelAttachmentModel.d.ts +11 -0
- package/dist/models/RequestParcelAttachmentModel.js +52 -0
- package/dist/models/RequestParcelChatModel.d.ts +19 -0
- package/dist/models/RequestParcelChatModel.js +78 -0
- package/dist/models/RequestParcelRequestModel.d.ts +35 -0
- package/dist/models/RequestParcelRequestModel.js +106 -0
- package/dist/models/RequestParcelWorkflowModel.d.ts +17 -0
- package/dist/models/RequestParcelWorkflowModel.js +62 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +5 -0
- package/src/models/RequestParcelApprovalModel.ts +51 -0
- package/src/models/RequestParcelAttachmentModel.ts +30 -0
- package/src/models/RequestParcelChatModel.ts +65 -0
- package/src/models/RequestParcelRequestModel.ts +78 -0
- package/src/models/RequestParcelWorkflowModel.ts +38 -0
package/dist/data-source.js
CHANGED
|
@@ -106,6 +106,11 @@ const RegisterCandidateApprovalModel_1 = require("./models/RegisterCandidateAppr
|
|
|
106
106
|
const RegisterCandidateAttachmentModel_1 = require("./models/RegisterCandidateAttachmentModel");
|
|
107
107
|
const RegisterCandidateChatModel_1 = require("./models/RegisterCandidateChatModel");
|
|
108
108
|
const RegisterCandidateWorkflowModel_1 = require("./models/RegisterCandidateWorkflowModel");
|
|
109
|
+
const RequestParcelRequestModel_1 = require("./models/RequestParcelRequestModel");
|
|
110
|
+
const RequestParcelApprovalModel_1 = require("./models/RequestParcelApprovalModel");
|
|
111
|
+
const RequestParcelAttachmentModel_1 = require("./models/RequestParcelAttachmentModel");
|
|
112
|
+
const RequestParcelChatModel_1 = require("./models/RequestParcelChatModel");
|
|
113
|
+
const RequestParcelWorkflowModel_1 = require("./models/RequestParcelWorkflowModel");
|
|
109
114
|
const GroupNamesModel_1 = require("./models/GroupNamesModel");
|
|
110
115
|
const GroupModel_1 = require("./models/GroupModel");
|
|
111
116
|
const WorkScheduleModel_1 = require("./models/WorkScheduleModel");
|
|
@@ -242,6 +247,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
242
247
|
RegisterCandidateAttachmentModel_1.RegisterCandidateRequestAttachment,
|
|
243
248
|
RegisterCandidateChatModel_1.RegisterCandidateRequestChat,
|
|
244
249
|
RegisterCandidateWorkflowModel_1.RegisterCandidateWorkFlow,
|
|
250
|
+
RequestParcelRequestModel_1.RequestParcelRequests,
|
|
251
|
+
RequestParcelApprovalModel_1.RequestParcelApprovalDetails,
|
|
252
|
+
RequestParcelAttachmentModel_1.RequestParcelRequestAttachment,
|
|
253
|
+
RequestParcelChatModel_1.RequestParcelRequestChat,
|
|
254
|
+
RequestParcelWorkflowModel_1.RequestParcelWorkFlow,
|
|
245
255
|
GroupNamesModel_1.GroupNames,
|
|
246
256
|
GroupModel_1.Group,
|
|
247
257
|
WorkScheduleModel_1.WorkSchedule,
|
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,11 @@ export * from './models/RegisterCandidateApprovalModel';
|
|
|
106
106
|
export * from './models/RegisterCandidateAttachmentModel';
|
|
107
107
|
export * from './models/RegisterCandidateChatModel';
|
|
108
108
|
export * from './models/RegisterCandidateWorkflowModel';
|
|
109
|
+
export * from './models/RequestParcelRequestModel';
|
|
110
|
+
export * from './models/RequestParcelApprovalModel';
|
|
111
|
+
export * from './models/RequestParcelAttachmentModel';
|
|
112
|
+
export * from './models/RequestParcelChatModel';
|
|
113
|
+
export * from './models/RequestParcelWorkflowModel';
|
|
109
114
|
export * from './models/GroupNamesModel';
|
|
110
115
|
export * from './models/GroupModel';
|
|
111
116
|
export * from './models/WorkScheduleModel';
|
package/dist/index.js
CHANGED
|
@@ -123,6 +123,11 @@ __exportStar(require("./models/RegisterCandidateApprovalModel"), exports);
|
|
|
123
123
|
__exportStar(require("./models/RegisterCandidateAttachmentModel"), exports);
|
|
124
124
|
__exportStar(require("./models/RegisterCandidateChatModel"), exports);
|
|
125
125
|
__exportStar(require("./models/RegisterCandidateWorkflowModel"), exports);
|
|
126
|
+
__exportStar(require("./models/RequestParcelRequestModel"), exports);
|
|
127
|
+
__exportStar(require("./models/RequestParcelApprovalModel"), exports);
|
|
128
|
+
__exportStar(require("./models/RequestParcelAttachmentModel"), exports);
|
|
129
|
+
__exportStar(require("./models/RequestParcelChatModel"), exports);
|
|
130
|
+
__exportStar(require("./models/RequestParcelWorkflowModel"), exports);
|
|
126
131
|
__exportStar(require("./models/GroupNamesModel"), exports);
|
|
127
132
|
__exportStar(require("./models/GroupModel"), exports);
|
|
128
133
|
__exportStar(require("./models/WorkScheduleModel"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum RequestParcelApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected"
|
|
7
|
+
}
|
|
8
|
+
export declare class RequestParcelApprovalDetails extends BaseModel {
|
|
9
|
+
request_id: number;
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
sub_service_id: number | null;
|
|
12
|
+
level: number;
|
|
13
|
+
approver_role_id: number;
|
|
14
|
+
department_id: number | null;
|
|
15
|
+
section_id: number | null;
|
|
16
|
+
approver_user_id: number | null;
|
|
17
|
+
delegate_user_id: number | null;
|
|
18
|
+
approved_by: number | null;
|
|
19
|
+
comment: string;
|
|
20
|
+
approval_status: RequestParcelApprovalStatus;
|
|
21
|
+
is_allowed: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.RequestParcelApprovalDetails = exports.RequestParcelApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var RequestParcelApprovalStatus;
|
|
16
|
+
(function (RequestParcelApprovalStatus) {
|
|
17
|
+
RequestParcelApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
RequestParcelApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
RequestParcelApprovalStatus["APPROVED"] = "Approved";
|
|
20
|
+
RequestParcelApprovalStatus["REJECTED"] = "Rejected";
|
|
21
|
+
})(RequestParcelApprovalStatus || (exports.RequestParcelApprovalStatus = RequestParcelApprovalStatus = {}));
|
|
22
|
+
let RequestParcelApprovalDetails = class RequestParcelApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
+
};
|
|
24
|
+
exports.RequestParcelApprovalDetails = RequestParcelApprovalDetails;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], RequestParcelApprovalDetails.prototype, "request_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], RequestParcelApprovalDetails.prototype, "service_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], RequestParcelApprovalDetails.prototype, "sub_service_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], RequestParcelApprovalDetails.prototype, "level", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], RequestParcelApprovalDetails.prototype, "approver_role_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], RequestParcelApprovalDetails.prototype, "department_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], RequestParcelApprovalDetails.prototype, "section_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], RequestParcelApprovalDetails.prototype, "approver_user_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], RequestParcelApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], RequestParcelApprovalDetails.prototype, "approved_by", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], RequestParcelApprovalDetails.prototype, "comment", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: RequestParcelApprovalStatus, default: RequestParcelApprovalStatus.PENDING, nullable: false }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], RequestParcelApprovalDetails.prototype, "approval_status", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
|
|
75
|
+
__metadata("design:type", Boolean)
|
|
76
|
+
], RequestParcelApprovalDetails.prototype, "is_allowed", void 0);
|
|
77
|
+
exports.RequestParcelApprovalDetails = RequestParcelApprovalDetails = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)({ name: 'request_parcel_approvals' })
|
|
79
|
+
], RequestParcelApprovalDetails);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class RequestParcelRequestAttachment 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
|
+
chat_id: number | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.RequestParcelRequestAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let RequestParcelRequestAttachment = class RequestParcelRequestAttachment extends BaseModel_1.BaseModel {
|
|
16
|
+
};
|
|
17
|
+
exports.RequestParcelRequestAttachment = RequestParcelRequestAttachment;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], RequestParcelRequestAttachment.prototype, "request_id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], RequestParcelRequestAttachment.prototype, "service_id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], RequestParcelRequestAttachment.prototype, "sub_service_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], RequestParcelRequestAttachment.prototype, "file_url", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RequestParcelRequestAttachment.prototype, "file_name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], RequestParcelRequestAttachment.prototype, "file_type", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], RequestParcelRequestAttachment.prototype, "file_size", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], RequestParcelRequestAttachment.prototype, "chat_id", void 0);
|
|
50
|
+
exports.RequestParcelRequestAttachment = RequestParcelRequestAttachment = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ name: 'request_parcel_attachments' })
|
|
52
|
+
], RequestParcelRequestAttachment);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum RequestParcelMessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare class RequestParcelRequestChat extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
user_id: number;
|
|
14
|
+
role_id: number;
|
|
15
|
+
message: string;
|
|
16
|
+
messageType: RequestParcelMessageType;
|
|
17
|
+
status: string;
|
|
18
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: RequestParcelMessageType, status?: string);
|
|
19
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.RequestParcelRequestChat = exports.RequestParcelMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const RequestParcelApprovalModel_1 = require("./RequestParcelApprovalModel");
|
|
16
|
+
var RequestParcelMessageType;
|
|
17
|
+
(function (RequestParcelMessageType) {
|
|
18
|
+
RequestParcelMessageType["TEXT"] = "text";
|
|
19
|
+
RequestParcelMessageType["IMAGE"] = "image";
|
|
20
|
+
RequestParcelMessageType["VIDEO"] = "video";
|
|
21
|
+
RequestParcelMessageType["FILE"] = "file";
|
|
22
|
+
RequestParcelMessageType["LINK"] = "link";
|
|
23
|
+
})(RequestParcelMessageType || (exports.RequestParcelMessageType = RequestParcelMessageType = {}));
|
|
24
|
+
let RequestParcelRequestChat = class RequestParcelRequestChat extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
26
|
+
super();
|
|
27
|
+
this.request_id = request_id;
|
|
28
|
+
this.service_id = service_id || null;
|
|
29
|
+
this.sub_service_id = sub_service_id || null;
|
|
30
|
+
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
32
|
+
this.message = message;
|
|
33
|
+
this.messageType = messageType || RequestParcelMessageType.TEXT;
|
|
34
|
+
this.status = status || RequestParcelApprovalModel_1.RequestParcelApprovalStatus.PENDING;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.RequestParcelRequestChat = RequestParcelRequestChat;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], RequestParcelRequestChat.prototype, "request_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], RequestParcelRequestChat.prototype, "service_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], RequestParcelRequestChat.prototype, "sub_service_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], RequestParcelRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], RequestParcelRequestChat.prototype, "role_id", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], RequestParcelRequestChat.prototype, "message", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: 'enum',
|
|
65
|
+
enum: RequestParcelMessageType,
|
|
66
|
+
default: RequestParcelMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], RequestParcelRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], RequestParcelRequestChat.prototype, "status", void 0);
|
|
75
|
+
exports.RequestParcelRequestChat = RequestParcelRequestChat = __decorate([
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'request_parcel_chats' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
78
|
+
], RequestParcelRequestChat);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum RequestParcelStatus {
|
|
3
|
+
SUBMITTED = "Submitted",
|
|
4
|
+
IN_TRANSIT = "In Transit",
|
|
5
|
+
RECEIVED = "Received"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ImportanceOfPouchType {
|
|
8
|
+
NORMAL = "Normal",
|
|
9
|
+
URGENT = "Urgent",
|
|
10
|
+
CONFIDENTIAL = "Confidential"
|
|
11
|
+
}
|
|
12
|
+
export declare enum PriorityType {
|
|
13
|
+
LOW = "Low",
|
|
14
|
+
MEDIUM = "Medium",
|
|
15
|
+
HIGH = "High"
|
|
16
|
+
}
|
|
17
|
+
export declare class RequestParcelRequests extends BaseModel {
|
|
18
|
+
req_user_department_id: number | null;
|
|
19
|
+
req_user_section_id: number | null;
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
user_id: number;
|
|
23
|
+
importance_of_pouch: ImportanceOfPouchType | null;
|
|
24
|
+
contents: string;
|
|
25
|
+
price: number | null;
|
|
26
|
+
shipment_courier_number: string | null;
|
|
27
|
+
max_delivery_date: Date | null;
|
|
28
|
+
mission_selection: string | null;
|
|
29
|
+
priority: PriorityType | null;
|
|
30
|
+
receiving_department: number | null;
|
|
31
|
+
receiving_section: number | null;
|
|
32
|
+
mc_ministry: string | null;
|
|
33
|
+
status: RequestParcelStatus;
|
|
34
|
+
workflow_execution_id: string | null;
|
|
35
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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.RequestParcelRequests = exports.PriorityType = exports.ImportanceOfPouchType = exports.RequestParcelStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var RequestParcelStatus;
|
|
16
|
+
(function (RequestParcelStatus) {
|
|
17
|
+
RequestParcelStatus["SUBMITTED"] = "Submitted";
|
|
18
|
+
RequestParcelStatus["IN_TRANSIT"] = "In Transit";
|
|
19
|
+
RequestParcelStatus["RECEIVED"] = "Received";
|
|
20
|
+
})(RequestParcelStatus || (exports.RequestParcelStatus = RequestParcelStatus = {}));
|
|
21
|
+
var ImportanceOfPouchType;
|
|
22
|
+
(function (ImportanceOfPouchType) {
|
|
23
|
+
ImportanceOfPouchType["NORMAL"] = "Normal";
|
|
24
|
+
ImportanceOfPouchType["URGENT"] = "Urgent";
|
|
25
|
+
ImportanceOfPouchType["CONFIDENTIAL"] = "Confidential";
|
|
26
|
+
})(ImportanceOfPouchType || (exports.ImportanceOfPouchType = ImportanceOfPouchType = {}));
|
|
27
|
+
var PriorityType;
|
|
28
|
+
(function (PriorityType) {
|
|
29
|
+
PriorityType["LOW"] = "Low";
|
|
30
|
+
PriorityType["MEDIUM"] = "Medium";
|
|
31
|
+
PriorityType["HIGH"] = "High";
|
|
32
|
+
})(PriorityType || (exports.PriorityType = PriorityType = {}));
|
|
33
|
+
let RequestParcelRequests = class RequestParcelRequests extends BaseModel_1.BaseModel {
|
|
34
|
+
};
|
|
35
|
+
exports.RequestParcelRequests = RequestParcelRequests;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], RequestParcelRequests.prototype, "req_user_department_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], RequestParcelRequests.prototype, "req_user_section_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], RequestParcelRequests.prototype, "service_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], RequestParcelRequests.prototype, "sub_service_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], RequestParcelRequests.prototype, "user_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: ImportanceOfPouchType, nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], RequestParcelRequests.prototype, "importance_of_pouch", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], RequestParcelRequests.prototype, "contents", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], RequestParcelRequests.prototype, "price", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], RequestParcelRequests.prototype, "shipment_courier_number", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], RequestParcelRequests.prototype, "max_delivery_date", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], RequestParcelRequests.prototype, "mission_selection", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: PriorityType, nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], RequestParcelRequests.prototype, "priority", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], RequestParcelRequests.prototype, "receiving_department", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], RequestParcelRequests.prototype, "receiving_section", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], RequestParcelRequests.prototype, "mc_ministry", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: RequestParcelStatus, default: RequestParcelStatus.SUBMITTED, nullable: false }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], RequestParcelRequests.prototype, "status", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], RequestParcelRequests.prototype, "workflow_execution_id", void 0);
|
|
104
|
+
exports.RequestParcelRequests = RequestParcelRequests = __decorate([
|
|
105
|
+
(0, typeorm_1.Entity)({ name: 'request_parcel_requests' })
|
|
106
|
+
], RequestParcelRequests);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum RequestParcelWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class RequestParcelWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: RequestParcelWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.RequestParcelWorkFlow = exports.RequestParcelWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var RequestParcelWorkFlowStatus;
|
|
16
|
+
(function (RequestParcelWorkFlowStatus) {
|
|
17
|
+
RequestParcelWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
RequestParcelWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
RequestParcelWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(RequestParcelWorkFlowStatus || (exports.RequestParcelWorkFlowStatus = RequestParcelWorkFlowStatus = {}));
|
|
21
|
+
let RequestParcelWorkFlow = class RequestParcelWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
+
};
|
|
23
|
+
exports.RequestParcelWorkFlow = RequestParcelWorkFlow;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], RequestParcelWorkFlow.prototype, "request_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], RequestParcelWorkFlow.prototype, "service_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], RequestParcelWorkFlow.prototype, "sub_service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], RequestParcelWorkFlow.prototype, "content", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: RequestParcelWorkFlowStatus, default: RequestParcelWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], RequestParcelWorkFlow.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], RequestParcelWorkFlow.prototype, "user_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], RequestParcelWorkFlow.prototype, "role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], RequestParcelWorkFlow.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], RequestParcelWorkFlow.prototype, "section_id", void 0);
|
|
60
|
+
exports.RequestParcelWorkFlow = RequestParcelWorkFlow = __decorate([
|
|
61
|
+
(0, typeorm_1.Entity)({ name: 'request_parcel_workflows' })
|
|
62
|
+
], RequestParcelWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -111,6 +111,11 @@ import { RegisterCandidateApprovalDetails } from './models/RegisterCandidateAppr
|
|
|
111
111
|
import { RegisterCandidateRequestAttachment } from './models/RegisterCandidateAttachmentModel';
|
|
112
112
|
import { RegisterCandidateRequestChat } from './models/RegisterCandidateChatModel';
|
|
113
113
|
import { RegisterCandidateWorkFlow } from './models/RegisterCandidateWorkflowModel';
|
|
114
|
+
import { RequestParcelRequests } from './models/RequestParcelRequestModel';
|
|
115
|
+
import { RequestParcelApprovalDetails } from './models/RequestParcelApprovalModel';
|
|
116
|
+
import { RequestParcelRequestAttachment } from './models/RequestParcelAttachmentModel';
|
|
117
|
+
import { RequestParcelRequestChat } from './models/RequestParcelChatModel';
|
|
118
|
+
import { RequestParcelWorkFlow } from './models/RequestParcelWorkflowModel';
|
|
114
119
|
import { GroupNames } from './models/GroupNamesModel';
|
|
115
120
|
import { Group } from './models/GroupModel';
|
|
116
121
|
import { WorkSchedule } from './models/WorkScheduleModel';
|
|
@@ -249,6 +254,11 @@ export const AppDataSource = new DataSource({
|
|
|
249
254
|
RegisterCandidateRequestAttachment,
|
|
250
255
|
RegisterCandidateRequestChat,
|
|
251
256
|
RegisterCandidateWorkFlow,
|
|
257
|
+
RequestParcelRequests,
|
|
258
|
+
RequestParcelApprovalDetails,
|
|
259
|
+
RequestParcelRequestAttachment,
|
|
260
|
+
RequestParcelRequestChat,
|
|
261
|
+
RequestParcelWorkFlow,
|
|
252
262
|
GroupNames,
|
|
253
263
|
Group,
|
|
254
264
|
WorkSchedule,
|
package/src/index.ts
CHANGED
|
@@ -106,6 +106,11 @@ export * from './models/RegisterCandidateApprovalModel';
|
|
|
106
106
|
export * from './models/RegisterCandidateAttachmentModel';
|
|
107
107
|
export * from './models/RegisterCandidateChatModel';
|
|
108
108
|
export * from './models/RegisterCandidateWorkflowModel';
|
|
109
|
+
export * from './models/RequestParcelRequestModel';
|
|
110
|
+
export * from './models/RequestParcelApprovalModel';
|
|
111
|
+
export * from './models/RequestParcelAttachmentModel';
|
|
112
|
+
export * from './models/RequestParcelChatModel';
|
|
113
|
+
export * from './models/RequestParcelWorkflowModel';
|
|
109
114
|
export * from './models/GroupNamesModel';
|
|
110
115
|
export * from './models/GroupModel';
|
|
111
116
|
export * from './models/WorkScheduleModel';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum RequestParcelApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'request_parcel_approvals' })
|
|
12
|
+
export class RequestParcelApprovalDetails extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
|
+
request_id: number;
|
|
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
|
+
level: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: true })
|
|
26
|
+
approver_role_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
department_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
section_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
approver_user_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
delegate_user_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
approved_by: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
44
|
+
comment: string;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'enum', enum: RequestParcelApprovalStatus, default: RequestParcelApprovalStatus.PENDING, nullable: false })
|
|
47
|
+
approval_status: RequestParcelApprovalStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
50
|
+
is_allowed: boolean;
|
|
51
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'request_parcel_attachments' })
|
|
5
|
+
export class RequestParcelRequestAttachment extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'integer', nullable: false })
|
|
8
|
+
request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: true })
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_url: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
+
file_name: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
23
|
+
file_type: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'bigint', nullable: true })
|
|
26
|
+
file_size: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
chat_id: number | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { RequestParcelApprovalStatus } from './RequestParcelApprovalModel';
|
|
4
|
+
|
|
5
|
+
export enum RequestParcelMessageType {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
VIDEO = "video",
|
|
9
|
+
FILE = "file",
|
|
10
|
+
LINK = "link"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'request_parcel_chats' })
|
|
14
|
+
export class RequestParcelRequestChat extends BaseModel {
|
|
15
|
+
|
|
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
|
+
user_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'text', nullable: false })
|
|
32
|
+
message: string;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: RequestParcelMessageType,
|
|
37
|
+
default: RequestParcelMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
40
|
+
messageType: RequestParcelMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'text', nullable: true })
|
|
43
|
+
status: string;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: RequestParcelMessageType,
|
|
53
|
+
status?: string
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || RequestParcelMessageType.TEXT;
|
|
63
|
+
this.status = status || RequestParcelApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum RequestParcelStatus {
|
|
5
|
+
SUBMITTED = "Submitted",
|
|
6
|
+
IN_TRANSIT = "In Transit",
|
|
7
|
+
RECEIVED = "Received",
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum ImportanceOfPouchType {
|
|
11
|
+
NORMAL = "Normal",
|
|
12
|
+
URGENT = "Urgent",
|
|
13
|
+
CONFIDENTIAL = "Confidential"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum PriorityType {
|
|
17
|
+
LOW = "Low",
|
|
18
|
+
MEDIUM = "Medium",
|
|
19
|
+
HIGH = "High"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Entity({ name: 'request_parcel_requests' })
|
|
23
|
+
export class RequestParcelRequests extends BaseModel {
|
|
24
|
+
|
|
25
|
+
// Common columns from register_vacancy_requests
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
req_user_department_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
req_user_section_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
service_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
sub_service_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: false })
|
|
39
|
+
user_id: number;
|
|
40
|
+
|
|
41
|
+
// New columns
|
|
42
|
+
@Column({ type: 'enum', enum: ImportanceOfPouchType, nullable: true })
|
|
43
|
+
importance_of_pouch: ImportanceOfPouchType | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'text', nullable: false })
|
|
46
|
+
contents: string;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
49
|
+
price: number | null;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
52
|
+
shipment_courier_number: string | null;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'date', nullable: true })
|
|
55
|
+
max_delivery_date: Date | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'varchar', nullable: true })
|
|
58
|
+
mission_selection: string | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'enum', enum: PriorityType, nullable: true })
|
|
61
|
+
priority: PriorityType | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'int', nullable: true })
|
|
64
|
+
receiving_department: number | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'int', nullable: true })
|
|
67
|
+
receiving_section: number | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
70
|
+
mc_ministry: string | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: 'enum', enum: RequestParcelStatus, default: RequestParcelStatus.SUBMITTED, nullable: false })
|
|
73
|
+
status: RequestParcelStatus;
|
|
74
|
+
|
|
75
|
+
@Column({ type: 'varchar', nullable: true })
|
|
76
|
+
workflow_execution_id: string | null;
|
|
77
|
+
|
|
78
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum RequestParcelWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'request_parcel_workflows' })
|
|
11
|
+
export class RequestParcelWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
request_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
service_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
22
|
+
content: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'enum', enum: RequestParcelWorkFlowStatus, default: RequestParcelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: RequestParcelWorkFlowStatus;
|
|
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;
|
|
38
|
+
}
|