@platform-modules/civil-aviation-authority 2.0.81 → 2.0.83

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 CHANGED
@@ -1,5 +1,11 @@
1
- DB_HOST=localhost
2
- DB_PORT=5433
3
- DB_USER=postgres
4
- DB_PASS=123
1
+ # DB_HOST=localhost
2
+ # DB_PORT=5433
3
+ # DB_USER=postgres
4
+ # DB_PASS=123
5
+ # DB_NAME=CAA
6
+
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
5
11
  DB_NAME=CAA
@@ -49,6 +49,11 @@ const VpnApprovalModel_1 = require("./models/VpnApprovalModel");
49
49
  const VpnWorkflowModel_1 = require("./models/VpnWorkflowModel");
50
50
  const VpnRequestAttachmentModel_1 = require("./models/VpnRequestAttachmentModel");
51
51
  const VpnRequestChatModel_1 = require("./models/VpnRequestChatModel");
52
+ const AccessCardRequestModel_1 = require("./models/AccessCardRequestModel");
53
+ const AccessCardApprovalModel_1 = require("./models/AccessCardApprovalModel");
54
+ const AccessCardAttachmentModel_1 = require("./models/AccessCardAttachmentModel");
55
+ const AccessCardChatModel_1 = require("./models/AccessCardChatModel");
56
+ const AccessCardWorkflowModel_1 = require("./models/AccessCardWorkflowModel");
52
57
  exports.AppDataSource = new typeorm_1.DataSource({
53
58
  type: 'postgres',
54
59
  host: process.env.DB_HOST || 'localhost',
@@ -93,6 +98,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
93
98
  LogisticsChatModel_1.LogisticsRequestChat,
94
99
  LogisticsAttachmentModel_1.LogisticsRequestAttachment,
95
100
  LogisticsWorkflowModel_1.LogisticsWorkFlow,
101
+ AccessCardRequestModel_1.AccessCardRequest,
102
+ AccessCardApprovalModel_1.AccessCardApproval,
103
+ AccessCardAttachmentModel_1.AccessCardAttachment,
104
+ AccessCardChatModel_1.AccessCardRequestChat,
105
+ AccessCardWorkflowModel_1.AccessCardWorkflow,
96
106
  importantLinksModel_1.ImportantLinks,
97
107
  DelegateSettingsModel_1.DelegateSettings,
98
108
  feedbackModel_1.Feedback,
package/dist/index.d.ts CHANGED
@@ -30,6 +30,11 @@ export * from './models/LogisticsChatModel';
30
30
  export * from './models/LogisticsAttachmentModel';
31
31
  export * from './models/importantLinksModel';
32
32
  export * from './models/LogisticsWorkflowModel';
33
+ export * from './models/AccessCardRequestModel';
34
+ export * from './models/AccessCardApprovalModel';
35
+ export * from './models/AccessCardAttachmentModel';
36
+ export * from './models/AccessCardChatModel';
37
+ export * from './models/AccessCardWorkflowModel';
33
38
  export * from './models/DelegateSettingsModel';
34
39
  export * from './models/feedbackModel';
35
40
  export * from './models/PortalFeedbackModel';
package/dist/index.js CHANGED
@@ -50,6 +50,11 @@ __exportStar(require("./models/LogisticsChatModel"), exports);
50
50
  __exportStar(require("./models/LogisticsAttachmentModel"), exports);
51
51
  __exportStar(require("./models/importantLinksModel"), exports);
52
52
  __exportStar(require("./models/LogisticsWorkflowModel"), exports);
53
+ __exportStar(require("./models/AccessCardRequestModel"), exports);
54
+ __exportStar(require("./models/AccessCardApprovalModel"), exports);
55
+ __exportStar(require("./models/AccessCardAttachmentModel"), exports);
56
+ __exportStar(require("./models/AccessCardChatModel"), exports);
57
+ __exportStar(require("./models/AccessCardWorkflowModel"), exports);
53
58
  __exportStar(require("./models/DelegateSettingsModel"), exports);
54
59
  __exportStar(require("./models/feedbackModel"), exports);
55
60
  __exportStar(require("./models/PortalFeedbackModel"), exports);
@@ -0,0 +1,22 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccessCardApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class AccessCardApproval 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: AccessCardApprovalStatus;
21
+ constructor(request_id: number, approver_role_id: number, level: number, comment: string, approval_status: AccessCardApprovalStatus, service_id?: number, sub_service_id?: number, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null);
22
+ }
@@ -0,0 +1,96 @@
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.AccessCardApproval = exports.AccessCardApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccessCardApprovalStatus;
16
+ (function (AccessCardApprovalStatus) {
17
+ AccessCardApprovalStatus["PENDING"] = "Pending";
18
+ AccessCardApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ AccessCardApprovalStatus["APPROVED"] = "Approved";
20
+ AccessCardApprovalStatus["REJECTED"] = "Rejected";
21
+ })(AccessCardApprovalStatus || (exports.AccessCardApprovalStatus = AccessCardApprovalStatus = {}));
22
+ let AccessCardApproval = class AccessCardApproval extends BaseModel_1.BaseModel {
23
+ constructor(request_id, approver_role_id, level, comment, approval_status, service_id, sub_service_id, department_id, section_id, approver_user_id, delegate_user_id, approved_by) {
24
+ super();
25
+ this.request_id = request_id;
26
+ this.service_id = service_id ?? null;
27
+ this.sub_service_id = sub_service_id ?? null;
28
+ this.level = level;
29
+ this.approver_role_id = approver_role_id;
30
+ this.department_id = department_id ?? null;
31
+ this.section_id = section_id ?? null;
32
+ this.approver_user_id = approver_user_id ?? null;
33
+ this.delegate_user_id = delegate_user_id ?? null;
34
+ this.approved_by = approved_by ?? null;
35
+ this.comment = comment;
36
+ this.approval_status = approval_status;
37
+ }
38
+ };
39
+ exports.AccessCardApproval = AccessCardApproval;
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
42
+ __metadata("design:type", Number)
43
+ ], AccessCardApproval.prototype, "request_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], AccessCardApproval.prototype, "service_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], AccessCardApproval.prototype, "sub_service_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
54
+ __metadata("design:type", Number)
55
+ ], AccessCardApproval.prototype, "level", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
58
+ __metadata("design:type", Number)
59
+ ], AccessCardApproval.prototype, "approver_role_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
62
+ __metadata("design:type", Object)
63
+ ], AccessCardApproval.prototype, "department_id", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], AccessCardApproval.prototype, "section_id", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], AccessCardApproval.prototype, "approver_user_id", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
74
+ __metadata("design:type", Object)
75
+ ], AccessCardApproval.prototype, "delegate_user_id", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], AccessCardApproval.prototype, "approved_by", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true, default: "" }),
82
+ __metadata("design:type", String)
83
+ ], AccessCardApproval.prototype, "comment", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: "enum",
87
+ enum: AccessCardApprovalStatus,
88
+ default: AccessCardApprovalStatus.PENDING,
89
+ nullable: false
90
+ }),
91
+ __metadata("design:type", String)
92
+ ], AccessCardApproval.prototype, "approval_status", void 0);
93
+ exports.AccessCardApproval = AccessCardApproval = __decorate([
94
+ (0, typeorm_1.Entity)({ name: "access_card_approvals" }),
95
+ __metadata("design:paramtypes", [Number, Number, Number, String, String, Number, Number, Object, Object, Object, Object, Object])
96
+ ], AccessCardApproval);
@@ -0,0 +1,12 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare class AccessCardAttachment 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
+ constructor(request_id: number, file_url: string, service_id?: number, sub_service_id?: number, file_name?: string, file_type?: string, file_size?: number, chat_id?: number);
12
+ }
@@ -0,0 +1,64 @@
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.AccessCardAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let AccessCardAttachment = class AccessCardAttachment extends BaseModel_1.BaseModel {
16
+ constructor(request_id, file_url, service_id, sub_service_id, file_name, file_type, file_size, chat_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
+ this.chat_id = chat_id ?? null;
26
+ }
27
+ };
28
+ exports.AccessCardAttachment = AccessCardAttachment;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AccessCardAttachment.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], AccessCardAttachment.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], AccessCardAttachment.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
43
+ __metadata("design:type", String)
44
+ ], AccessCardAttachment.prototype, "file_url", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], AccessCardAttachment.prototype, "file_name", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], AccessCardAttachment.prototype, "file_type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "bigint", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], AccessCardAttachment.prototype, "file_size", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], AccessCardAttachment.prototype, "chat_id", void 0);
61
+ exports.AccessCardAttachment = AccessCardAttachment = __decorate([
62
+ (0, typeorm_1.Entity)({ name: "access_card_attachments" }),
63
+ __metadata("design:paramtypes", [Number, String, Number, Number, String, String, Number, Number])
64
+ ], AccessCardAttachment);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccessCardMessageType {
3
+ TEXT = "text",
4
+ IMAGE = "image",
5
+ VIDEO = "video",
6
+ FILE = "file",
7
+ LINK = "link"
8
+ }
9
+ export declare class AccessCardRequestChat 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: AccessCardMessageType;
16
+ constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: AccessCardMessageType);
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.AccessCardRequestChat = exports.AccessCardMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccessCardMessageType;
16
+ (function (AccessCardMessageType) {
17
+ AccessCardMessageType["TEXT"] = "text";
18
+ AccessCardMessageType["IMAGE"] = "image";
19
+ AccessCardMessageType["VIDEO"] = "video";
20
+ AccessCardMessageType["FILE"] = "file";
21
+ AccessCardMessageType["LINK"] = "link";
22
+ })(AccessCardMessageType || (exports.AccessCardMessageType = AccessCardMessageType = {}));
23
+ let AccessCardRequestChat = class AccessCardRequestChat 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 ?? AccessCardMessageType.TEXT;
32
+ }
33
+ };
34
+ exports.AccessCardRequestChat = AccessCardRequestChat;
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
37
+ __metadata("design:type", Number)
38
+ ], AccessCardRequestChat.prototype, "request_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], AccessCardRequestChat.prototype, "service_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], AccessCardRequestChat.prototype, "sub_service_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
49
+ __metadata("design:type", Number)
50
+ ], AccessCardRequestChat.prototype, "user_id", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
53
+ __metadata("design:type", String)
54
+ ], AccessCardRequestChat.prototype, "message", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({
57
+ type: "enum",
58
+ enum: AccessCardMessageType,
59
+ default: AccessCardMessageType.TEXT,
60
+ nullable: false
61
+ }),
62
+ __metadata("design:type", String)
63
+ ], AccessCardRequestChat.prototype, "messageType", void 0);
64
+ exports.AccessCardRequestChat = AccessCardRequestChat = __decorate([
65
+ (0, typeorm_1.Entity)({ name: "access_card_request_chat" }),
66
+ __metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
67
+ ], AccessCardRequestChat);
@@ -0,0 +1,43 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccessCardRequestFor {
3
+ SELF = "Self",
4
+ BEHALF = "Behalf"
5
+ }
6
+ export declare enum AccessCardRequestType {
7
+ NEW = "New",
8
+ RENEWAL = "Renewal"
9
+ }
10
+ export declare enum AccessCardCategory {
11
+ TRAINEE = "Trainee",
12
+ WORKER = "Workers",
13
+ EMPLOYEE = "Employees",
14
+ CONTRACTOR = "Contractors"
15
+ }
16
+ export declare enum AccessCardRequestStatus {
17
+ PENDING = "Pending",
18
+ IN_PROGRESS = "In Progress",
19
+ APPROVED = "Approved",
20
+ REJECTED = "Rejected"
21
+ }
22
+ export declare class AccessCardRequest extends BaseModel {
23
+ req_user_department_id: number | null;
24
+ req_user_section_id: number | null;
25
+ service_id: number | null;
26
+ sub_service_id: number | null;
27
+ user_id: number;
28
+ request_for: AccessCardRequestFor;
29
+ name: string;
30
+ id_number: string;
31
+ phone_number: string;
32
+ email_id: string;
33
+ request_type: AccessCardRequestType;
34
+ category: AccessCardCategory;
35
+ approval_route: string | null;
36
+ organization: string;
37
+ access_card_no: string | null;
38
+ reason: string;
39
+ request_date: Date;
40
+ status: AccessCardRequestStatus;
41
+ workflow_execution_id: string | null;
42
+ constructor(request_for: AccessCardRequestFor, name: string, id_number: string, phone_number: string, email_id: string, request_type: AccessCardRequestType, category: AccessCardCategory, organization: string, reason: string, request_date: Date, user_id: number, status?: AccessCardRequestStatus, approval_route?: string | null, service_id?: number, sub_service_id?: number, req_user_department_id?: number, req_user_section_id?: number, access_card_no?: string | null, workflow_execution_id?: string | null);
43
+ }
@@ -0,0 +1,148 @@
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.AccessCardRequest = exports.AccessCardRequestStatus = exports.AccessCardCategory = exports.AccessCardRequestType = exports.AccessCardRequestFor = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccessCardRequestFor;
16
+ (function (AccessCardRequestFor) {
17
+ AccessCardRequestFor["SELF"] = "Self";
18
+ AccessCardRequestFor["BEHALF"] = "Behalf";
19
+ })(AccessCardRequestFor || (exports.AccessCardRequestFor = AccessCardRequestFor = {}));
20
+ var AccessCardRequestType;
21
+ (function (AccessCardRequestType) {
22
+ AccessCardRequestType["NEW"] = "New";
23
+ AccessCardRequestType["RENEWAL"] = "Renewal";
24
+ })(AccessCardRequestType || (exports.AccessCardRequestType = AccessCardRequestType = {}));
25
+ var AccessCardCategory;
26
+ (function (AccessCardCategory) {
27
+ AccessCardCategory["TRAINEE"] = "Trainee";
28
+ AccessCardCategory["WORKER"] = "Workers";
29
+ AccessCardCategory["EMPLOYEE"] = "Employees";
30
+ AccessCardCategory["CONTRACTOR"] = "Contractors";
31
+ })(AccessCardCategory || (exports.AccessCardCategory = AccessCardCategory = {}));
32
+ var AccessCardRequestStatus;
33
+ (function (AccessCardRequestStatus) {
34
+ AccessCardRequestStatus["PENDING"] = "Pending";
35
+ AccessCardRequestStatus["IN_PROGRESS"] = "In Progress";
36
+ AccessCardRequestStatus["APPROVED"] = "Approved";
37
+ AccessCardRequestStatus["REJECTED"] = "Rejected";
38
+ })(AccessCardRequestStatus || (exports.AccessCardRequestStatus = AccessCardRequestStatus = {}));
39
+ let AccessCardRequest = class AccessCardRequest extends BaseModel_1.BaseModel {
40
+ constructor(request_for, name, id_number, phone_number, email_id, request_type, category, organization, reason, request_date, user_id, status = AccessCardRequestStatus.PENDING, approval_route, service_id, sub_service_id, req_user_department_id, req_user_section_id, access_card_no, workflow_execution_id) {
41
+ super();
42
+ this.request_for = request_for;
43
+ this.name = name;
44
+ this.id_number = id_number;
45
+ this.phone_number = phone_number;
46
+ this.email_id = email_id;
47
+ this.request_type = request_type;
48
+ this.category = category;
49
+ this.organization = organization;
50
+ this.reason = reason;
51
+ this.request_date = request_date;
52
+ this.user_id = user_id;
53
+ this.status = status;
54
+ this.approval_route = approval_route ?? null;
55
+ this.service_id = service_id ?? null;
56
+ this.sub_service_id = sub_service_id ?? null;
57
+ this.req_user_department_id = req_user_department_id ?? null;
58
+ this.req_user_section_id = req_user_section_id ?? null;
59
+ this.access_card_no = access_card_no ?? null;
60
+ this.workflow_execution_id = workflow_execution_id ?? null;
61
+ }
62
+ };
63
+ exports.AccessCardRequest = AccessCardRequest;
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], AccessCardRequest.prototype, "req_user_department_id", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], AccessCardRequest.prototype, "req_user_section_id", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
74
+ __metadata("design:type", Object)
75
+ ], AccessCardRequest.prototype, "service_id", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], AccessCardRequest.prototype, "sub_service_id", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: "int", nullable: false }),
82
+ __metadata("design:type", Number)
83
+ ], AccessCardRequest.prototype, "user_id", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: "enum", enum: AccessCardRequestFor, nullable: false }),
86
+ __metadata("design:type", String)
87
+ ], AccessCardRequest.prototype, "request_for", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
90
+ __metadata("design:type", String)
91
+ ], AccessCardRequest.prototype, "name", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
94
+ __metadata("design:type", String)
95
+ ], AccessCardRequest.prototype, "id_number", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: false }),
98
+ __metadata("design:type", String)
99
+ ], AccessCardRequest.prototype, "phone_number", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
102
+ __metadata("design:type", String)
103
+ ], AccessCardRequest.prototype, "email_id", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.Column)({ type: "enum", enum: AccessCardRequestType, nullable: false }),
106
+ __metadata("design:type", String)
107
+ ], AccessCardRequest.prototype, "request_type", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.Column)({ type: "enum", enum: AccessCardCategory, nullable: false }),
110
+ __metadata("design:type", String)
111
+ ], AccessCardRequest.prototype, "category", void 0);
112
+ __decorate([
113
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
114
+ __metadata("design:type", Object)
115
+ ], AccessCardRequest.prototype, "approval_route", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
118
+ __metadata("design:type", String)
119
+ ], AccessCardRequest.prototype, "organization", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
122
+ __metadata("design:type", Object)
123
+ ], AccessCardRequest.prototype, "access_card_no", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
126
+ __metadata("design:type", String)
127
+ ], AccessCardRequest.prototype, "reason", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
130
+ __metadata("design:type", Date)
131
+ ], AccessCardRequest.prototype, "request_date", void 0);
132
+ __decorate([
133
+ (0, typeorm_1.Column)({
134
+ type: "enum",
135
+ enum: AccessCardRequestStatus,
136
+ default: AccessCardRequestStatus.PENDING,
137
+ nullable: false
138
+ }),
139
+ __metadata("design:type", String)
140
+ ], AccessCardRequest.prototype, "status", void 0);
141
+ __decorate([
142
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
143
+ __metadata("design:type", Object)
144
+ ], AccessCardRequest.prototype, "workflow_execution_id", void 0);
145
+ exports.AccessCardRequest = AccessCardRequest = __decorate([
146
+ (0, typeorm_1.Entity)({ name: "access_card_requests" }),
147
+ __metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, Date, Number, String, Object, Number, Number, Number, Number, Object, Object])
148
+ ], AccessCardRequest);
@@ -0,0 +1,14 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccessCardWorkflowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class AccessCardWorkflow extends BaseModel {
8
+ request_id: number;
9
+ service_id: number | null;
10
+ sub_service_id: number | null;
11
+ content: string;
12
+ status: AccessCardWorkflowStatus;
13
+ constructor(request_id: number, content: string, status: AccessCardWorkflowStatus, service_id?: number, sub_service_id?: number);
14
+ }
@@ -0,0 +1,60 @@
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.AccessCardWorkflow = exports.AccessCardWorkflowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccessCardWorkflowStatus;
16
+ (function (AccessCardWorkflowStatus) {
17
+ AccessCardWorkflowStatus["COMPLETED"] = "Completed";
18
+ AccessCardWorkflowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ AccessCardWorkflowStatus["PENDING"] = "Pending";
20
+ })(AccessCardWorkflowStatus || (exports.AccessCardWorkflowStatus = AccessCardWorkflowStatus = {}));
21
+ let AccessCardWorkflow = class AccessCardWorkflow extends BaseModel_1.BaseModel {
22
+ constructor(request_id, content, status, 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.content = content;
28
+ this.status = status;
29
+ }
30
+ };
31
+ exports.AccessCardWorkflow = AccessCardWorkflow;
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
34
+ __metadata("design:type", Number)
35
+ ], AccessCardWorkflow.prototype, "request_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], AccessCardWorkflow.prototype, "service_id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], AccessCardWorkflow.prototype, "sub_service_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
46
+ __metadata("design:type", String)
47
+ ], AccessCardWorkflow.prototype, "content", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({
50
+ type: "enum",
51
+ enum: AccessCardWorkflowStatus,
52
+ default: AccessCardWorkflowStatus.NOT_YET_STARTED,
53
+ nullable: false
54
+ }),
55
+ __metadata("design:type", String)
56
+ ], AccessCardWorkflow.prototype, "status", void 0);
57
+ exports.AccessCardWorkflow = AccessCardWorkflow = __decorate([
58
+ (0, typeorm_1.Entity)({ name: "access_card_workflows" }),
59
+ __metadata("design:paramtypes", [Number, String, String, Number, Number])
60
+ ], AccessCardWorkflow);
@@ -3,8 +3,7 @@ export declare enum VpnApprovalStatus {
3
3
  PENDING = "Pending",
4
4
  IN_PROGRESS = "In Progress",
5
5
  APPROVED = "Approved",
6
- REJECTED = "Rejected",
7
- ASSIGNED = "Assigned"
6
+ REJECTED = "Rejected"
8
7
  }
9
8
  export declare class VpnApprovalDetails extends BaseModel {
10
9
  request_id: number;
@@ -18,7 +18,6 @@ var VpnApprovalStatus;
18
18
  VpnApprovalStatus["IN_PROGRESS"] = "In Progress";
19
19
  VpnApprovalStatus["APPROVED"] = "Approved";
20
20
  VpnApprovalStatus["REJECTED"] = "Rejected";
21
- VpnApprovalStatus["ASSIGNED"] = "Assigned";
22
21
  })(VpnApprovalStatus || (exports.VpnApprovalStatus = VpnApprovalStatus = {}));
23
22
  let VpnApprovalDetails = class VpnApprovalDetails extends BaseModel_1.BaseModel {
24
23
  constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, is_manager) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.81",
3
+ "version": "2.0.83",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -46,6 +46,11 @@ import { VpnApprovalDetails } from './models/VpnApprovalModel';
46
46
  import { VpnWorkFlow } from './models/VpnWorkflowModel';
47
47
  import { VpnRequestAttachment } from './models/VpnRequestAttachmentModel';
48
48
  import { VpnRequestChat } from './models/VpnRequestChatModel';
49
+ import { AccessCardRequest } from './models/AccessCardRequestModel';
50
+ import { AccessCardApproval } from './models/AccessCardApprovalModel';
51
+ import { AccessCardAttachment } from './models/AccessCardAttachmentModel';
52
+ import { AccessCardRequestChat } from './models/AccessCardChatModel';
53
+ import { AccessCardWorkflow } from './models/AccessCardWorkflowModel';
49
54
 
50
55
 
51
56
  export const AppDataSource = new DataSource({
@@ -92,6 +97,11 @@ export const AppDataSource = new DataSource({
92
97
  LogisticsRequestChat,
93
98
  LogisticsRequestAttachment,
94
99
  LogisticsWorkFlow,
100
+ AccessCardRequest,
101
+ AccessCardApproval,
102
+ AccessCardAttachment,
103
+ AccessCardRequestChat,
104
+ AccessCardWorkflow,
95
105
  ImportantLinks,
96
106
  DelegateSettings,
97
107
  Feedback,
package/src/index.ts CHANGED
@@ -34,6 +34,11 @@ export * from './models/LogisticsChatModel';
34
34
  export * from './models/LogisticsAttachmentModel';
35
35
  export * from './models/importantLinksModel';
36
36
  export * from './models/LogisticsWorkflowModel';
37
+ export * from './models/AccessCardRequestModel';
38
+ export * from './models/AccessCardApprovalModel';
39
+ export * from './models/AccessCardAttachmentModel';
40
+ export * from './models/AccessCardChatModel';
41
+ export * from './models/AccessCardWorkflowModel';
37
42
  export * from './models/DelegateSettingsModel';
38
43
  export * from './models/feedbackModel';
39
44
  export * from './models/PortalFeedbackModel';
@@ -0,0 +1,83 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccessCardApprovalStatus {
5
+ PENDING = "Pending",
6
+ IN_PROGRESS = "In Progress",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected"
9
+ }
10
+
11
+ @Entity({ name: "access_card_approvals" })
12
+ export class AccessCardApproval 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: false })
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({
47
+ type: "enum",
48
+ enum: AccessCardApprovalStatus,
49
+ default: AccessCardApprovalStatus.PENDING,
50
+ nullable: false
51
+ })
52
+ approval_status: AccessCardApprovalStatus;
53
+
54
+ constructor(
55
+ request_id: number,
56
+ approver_role_id: number,
57
+ level: number,
58
+ comment: string,
59
+ approval_status: AccessCardApprovalStatus,
60
+ service_id?: number,
61
+ sub_service_id?: number,
62
+ department_id?: number | null,
63
+ section_id?: number | null,
64
+ approver_user_id?: number | null,
65
+ delegate_user_id?: number | null,
66
+ approved_by?: number | null
67
+ ) {
68
+ super();
69
+ this.request_id = request_id;
70
+ this.service_id = service_id ?? null;
71
+ this.sub_service_id = sub_service_id ?? null;
72
+ this.level = level;
73
+ this.approver_role_id = approver_role_id;
74
+ this.department_id = department_id ?? null;
75
+ this.section_id = section_id ?? null;
76
+ this.approver_user_id = approver_user_id ?? null;
77
+ this.delegate_user_id = delegate_user_id ?? null;
78
+ this.approved_by = approved_by ?? null;
79
+ this.comment = comment;
80
+ this.approval_status = approval_status;
81
+ }
82
+ }
83
+
@@ -0,0 +1,51 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "access_card_attachments" })
5
+ export class AccessCardAttachment extends BaseModel {
6
+ @Column({ type: "integer", nullable: false })
7
+ request_id: number;
8
+
9
+ @Column({ type: "integer", nullable: true })
10
+ service_id: number | null;
11
+
12
+ @Column({ type: "integer", nullable: true })
13
+ sub_service_id: number | null;
14
+
15
+ @Column({ type: "varchar", length: 500, nullable: false })
16
+ file_url: string;
17
+
18
+ @Column({ type: "varchar", length: 255, nullable: true })
19
+ file_name: string;
20
+
21
+ @Column({ type: "varchar", length: 100, nullable: true })
22
+ file_type: string;
23
+
24
+ @Column({ type: "bigint", nullable: true })
25
+ file_size: number | null;
26
+
27
+ @Column({ type: "integer", nullable: true })
28
+ chat_id: number | null;
29
+
30
+ constructor(
31
+ request_id: number,
32
+ file_url: string,
33
+ service_id?: number,
34
+ sub_service_id?: number,
35
+ file_name?: string,
36
+ file_type?: string,
37
+ file_size?: number,
38
+ chat_id?: number
39
+ ) {
40
+ super();
41
+ this.request_id = request_id;
42
+ this.service_id = service_id ?? null;
43
+ this.sub_service_id = sub_service_id ?? null;
44
+ this.file_url = file_url;
45
+ this.file_name = file_name ?? "";
46
+ this.file_type = file_type ?? "";
47
+ this.file_size = file_size ?? null;
48
+ this.chat_id = chat_id ?? null;
49
+ }
50
+ }
51
+
@@ -0,0 +1,54 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccessCardMessageType {
5
+ TEXT = "text",
6
+ IMAGE = "image",
7
+ VIDEO = "video",
8
+ FILE = "file",
9
+ LINK = "link"
10
+ }
11
+
12
+ @Entity({ name: "access_card_request_chat" })
13
+ export class AccessCardRequestChat extends BaseModel {
14
+ @Column({ type: "integer", nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: "integer", nullable: true })
18
+ service_id: number | null;
19
+
20
+ @Column({ type: "integer", nullable: true })
21
+ sub_service_id: number | null;
22
+
23
+ @Column({ type: "integer", nullable: false })
24
+ user_id: number;
25
+
26
+ @Column({ type: "text", nullable: false })
27
+ message: string;
28
+
29
+ @Column({
30
+ type: "enum",
31
+ enum: AccessCardMessageType,
32
+ default: AccessCardMessageType.TEXT,
33
+ nullable: false
34
+ })
35
+ messageType: AccessCardMessageType;
36
+
37
+ constructor(
38
+ request_id: number,
39
+ user_id: number,
40
+ message: string,
41
+ service_id?: number,
42
+ sub_service_id?: number,
43
+ messageType?: AccessCardMessageType
44
+ ) {
45
+ super();
46
+ this.request_id = request_id;
47
+ this.service_id = service_id ?? null;
48
+ this.sub_service_id = sub_service_id ?? null;
49
+ this.user_id = user_id;
50
+ this.message = message;
51
+ this.messageType = messageType ?? AccessCardMessageType.TEXT;
52
+ }
53
+ }
54
+
@@ -0,0 +1,135 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccessCardRequestFor {
5
+ SELF = "Self",
6
+ BEHALF = "Behalf"
7
+ }
8
+
9
+ export enum AccessCardRequestType {
10
+ NEW = "New",
11
+ RENEWAL = "Renewal"
12
+ }
13
+
14
+ export enum AccessCardCategory {
15
+ TRAINEE = "Trainee",
16
+ WORKER = "Workers",
17
+ EMPLOYEE = "Employees",
18
+ CONTRACTOR = "Contractors"
19
+ }
20
+
21
+ export enum AccessCardRequestStatus {
22
+ PENDING = "Pending",
23
+ IN_PROGRESS = "In Progress",
24
+ APPROVED = "Approved",
25
+ REJECTED = "Rejected"
26
+ }
27
+
28
+ @Entity({ name: "access_card_requests" })
29
+ export class AccessCardRequest extends BaseModel {
30
+ @Column({ type: "int", nullable: true })
31
+ req_user_department_id: number | null;
32
+
33
+ @Column({ type: "int", nullable: true })
34
+ req_user_section_id: number | null;
35
+
36
+ @Column({ type: "int", nullable: true })
37
+ service_id: number | null;
38
+
39
+ @Column({ type: "int", nullable: true })
40
+ sub_service_id: number | null;
41
+
42
+ @Column({ type: "int", nullable: false })
43
+ user_id: number;
44
+
45
+ @Column({ type: "enum", enum: AccessCardRequestFor, nullable: false })
46
+ request_for: AccessCardRequestFor;
47
+
48
+ @Column({ type: "varchar", length: 255, nullable: false })
49
+ name: string;
50
+
51
+ @Column({ type: "varchar", length: 100, nullable: false })
52
+ id_number: string;
53
+
54
+ @Column({ type: "varchar", length: 50, nullable: false })
55
+ phone_number: string;
56
+
57
+ @Column({ type: "varchar", length: 255, nullable: false })
58
+ email_id: string;
59
+
60
+ @Column({ type: "enum", enum: AccessCardRequestType, nullable: false })
61
+ request_type: AccessCardRequestType;
62
+
63
+ @Column({ type: "enum", enum: AccessCardCategory, nullable: false })
64
+ category: AccessCardCategory;
65
+
66
+ @Column({ type: "varchar", length: 50, nullable: true })
67
+ approval_route: string | null;
68
+
69
+ @Column({ type: "varchar", length: 255, nullable: false })
70
+ organization: string;
71
+
72
+ @Column({ type: "varchar", length: 100, nullable: true })
73
+ access_card_no: string | null;
74
+
75
+ @Column({ type: "text", nullable: false })
76
+ reason: string;
77
+
78
+ @Column({ type: "date", nullable: false })
79
+ request_date: Date;
80
+
81
+ @Column({
82
+ type: "enum",
83
+ enum: AccessCardRequestStatus,
84
+ default: AccessCardRequestStatus.PENDING,
85
+ nullable: false
86
+ })
87
+ status: AccessCardRequestStatus;
88
+
89
+ @Column({ type: "varchar", length: 255, nullable: true })
90
+ workflow_execution_id: string | null;
91
+
92
+ constructor(
93
+ request_for: AccessCardRequestFor,
94
+ name: string,
95
+ id_number: string,
96
+ phone_number: string,
97
+ email_id: string,
98
+ request_type: AccessCardRequestType,
99
+ category: AccessCardCategory,
100
+ organization: string,
101
+ reason: string,
102
+ request_date: Date,
103
+ user_id: number,
104
+ status: AccessCardRequestStatus = AccessCardRequestStatus.PENDING,
105
+ approval_route?: string | null,
106
+ service_id?: number,
107
+ sub_service_id?: number,
108
+ req_user_department_id?: number,
109
+ req_user_section_id?: number,
110
+ access_card_no?: string | null,
111
+ workflow_execution_id?: string | null
112
+ ) {
113
+ super();
114
+ this.request_for = request_for;
115
+ this.name = name;
116
+ this.id_number = id_number;
117
+ this.phone_number = phone_number;
118
+ this.email_id = email_id;
119
+ this.request_type = request_type;
120
+ this.category = category;
121
+ this.organization = organization;
122
+ this.reason = reason;
123
+ this.request_date = request_date;
124
+ this.user_id = user_id;
125
+ this.status = status;
126
+ this.approval_route = approval_route ?? null;
127
+ this.service_id = service_id ?? null;
128
+ this.sub_service_id = sub_service_id ?? null;
129
+ this.req_user_department_id = req_user_department_id ?? null;
130
+ this.req_user_section_id = req_user_section_id ?? null;
131
+ this.access_card_no = access_card_no ?? null;
132
+ this.workflow_execution_id = workflow_execution_id ?? null;
133
+ }
134
+ }
135
+
@@ -0,0 +1,47 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccessCardWorkflowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending"
8
+ }
9
+
10
+ @Entity({ name: "access_card_workflows" })
11
+ export class AccessCardWorkflow 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({
25
+ type: "enum",
26
+ enum: AccessCardWorkflowStatus,
27
+ default: AccessCardWorkflowStatus.NOT_YET_STARTED,
28
+ nullable: false
29
+ })
30
+ status: AccessCardWorkflowStatus;
31
+
32
+ constructor(
33
+ request_id: number,
34
+ content: string,
35
+ status: AccessCardWorkflowStatus,
36
+ service_id?: number,
37
+ sub_service_id?: number
38
+ ) {
39
+ super();
40
+ this.request_id = request_id;
41
+ this.service_id = service_id ?? null;
42
+ this.sub_service_id = sub_service_id ?? null;
43
+ this.content = content;
44
+ this.status = status;
45
+ }
46
+ }
47
+
@@ -5,8 +5,7 @@ export enum VpnApprovalStatus {
5
5
  PENDING = "Pending",
6
6
  IN_PROGRESS = "In Progress",
7
7
  APPROVED = "Approved",
8
- REJECTED = "Rejected",
9
- ASSIGNED = "Assigned"
8
+ REJECTED = "Rejected"
10
9
  }
11
10
 
12
11
  @Entity({ name: "vpn_approvals" })