@platform-modules/civil-aviation-authority 2.2.20 → 2.2.22

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.
@@ -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 HotelreservationModel_1 = require("./models/HotelreservationModel");
53
+ const HotelApprovalModel_1 = require("./models/HotelApprovalModel");
54
+ const HotelWorkFlowModel_1 = require("./models/HotelWorkFlowModel");
55
+ const HotelChatModel_1 = require("./models/HotelChatModel");
56
+ const HotelAttachedModel_1 = require("./models/HotelAttachedModel");
52
57
  exports.AppDataSource = new typeorm_1.DataSource({
53
58
  type: 'postgres',
54
59
  host: process.env.DB_HOST || 'localhost',
@@ -101,6 +106,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
101
106
  VpnApprovalModel_1.VpnApprovalDetails,
102
107
  VpnWorkflowModel_1.VpnWorkFlow,
103
108
  VpnRequestAttachmentModel_1.VpnRequestAttachment,
104
- VpnRequestChatModel_1.VpnRequestChat
109
+ VpnRequestChatModel_1.VpnRequestChat,
110
+ HotelreservationModel_1.HotelReservation,
111
+ HotelApprovalModel_1.HotelApprovalDetails,
112
+ HotelWorkFlowModel_1.HotelWorkFlow,
113
+ HotelChatModel_1.HotelRequestChat,
114
+ HotelAttachedModel_1.HotelRequestAttachment
105
115
  ],
106
116
  });
package/dist/index.d.ts CHANGED
@@ -38,3 +38,8 @@ export * from './models/VpnApprovalModel';
38
38
  export * from './models/VpnWorkflowModel';
39
39
  export * from './models/VpnRequestChatModel';
40
40
  export * from './models/VpnRequestAttachmentModel';
41
+ export * from './models/HotelreservationModel';
42
+ export * from './models/HotelApprovalModel';
43
+ export * from './models/HotelWorkFlowModel';
44
+ export * from './models/HotelChatModel';
45
+ export * from './models/HotelAttachedModel';
package/dist/index.js CHANGED
@@ -58,3 +58,8 @@ __exportStar(require("./models/VpnApprovalModel"), exports);
58
58
  __exportStar(require("./models/VpnWorkflowModel"), exports);
59
59
  __exportStar(require("./models/VpnRequestChatModel"), exports);
60
60
  __exportStar(require("./models/VpnRequestAttachmentModel"), exports);
61
+ __exportStar(require("./models/HotelreservationModel"), exports);
62
+ __exportStar(require("./models/HotelApprovalModel"), exports);
63
+ __exportStar(require("./models/HotelWorkFlowModel"), exports);
64
+ __exportStar(require("./models/HotelChatModel"), exports);
65
+ __exportStar(require("./models/HotelAttachedModel"), exports);
@@ -0,0 +1,22 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum HotelApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class HotelApprovalDetails 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: HotelApprovalStatus;
21
+ constructor(request_id: number, approver_role_id: number, comment: string, approval_status: HotelApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number);
22
+ }
@@ -0,0 +1,91 @@
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.HotelApprovalDetails = exports.HotelApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var HotelApprovalStatus;
16
+ (function (HotelApprovalStatus) {
17
+ HotelApprovalStatus["PENDING"] = "Pending";
18
+ HotelApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ HotelApprovalStatus["APPROVED"] = "Approved";
20
+ HotelApprovalStatus["REJECTED"] = "Rejected";
21
+ })(HotelApprovalStatus || (exports.HotelApprovalStatus = HotelApprovalStatus = {}));
22
+ let HotelApprovalDetails = class HotelApprovalDetails extends BaseModel_1.BaseModel {
23
+ constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approver_user_id, delegate_user_id, approved_by, service_id, sub_service_id) {
24
+ super();
25
+ this.request_id = request_id;
26
+ this.service_id = service_id || null;
27
+ this.sub_service_id = sub_service_id || null;
28
+ this.approver_role_id = approver_role_id;
29
+ this.comment = comment;
30
+ this.approval_status = approval_status;
31
+ this.level = level;
32
+ this.department_id = department_id || null;
33
+ this.section_id = section_id || null;
34
+ this.approver_user_id = approver_user_id || null;
35
+ this.delegate_user_id = delegate_user_id || null;
36
+ this.approved_by = approved_by || null;
37
+ }
38
+ };
39
+ exports.HotelApprovalDetails = HotelApprovalDetails;
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
42
+ __metadata("design:type", Number)
43
+ ], HotelApprovalDetails.prototype, "request_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], HotelApprovalDetails.prototype, "service_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], HotelApprovalDetails.prototype, "sub_service_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
54
+ __metadata("design:type", Number)
55
+ ], HotelApprovalDetails.prototype, "level", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
58
+ __metadata("design:type", Number)
59
+ ], HotelApprovalDetails.prototype, "approver_role_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
62
+ __metadata("design:type", Object)
63
+ ], HotelApprovalDetails.prototype, "department_id", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], HotelApprovalDetails.prototype, "section_id", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], HotelApprovalDetails.prototype, "approver_user_id", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
74
+ __metadata("design:type", Object)
75
+ ], HotelApprovalDetails.prototype, "delegate_user_id", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], HotelApprovalDetails.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
+ ], HotelApprovalDetails.prototype, "comment", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'enum', enum: HotelApprovalStatus, default: HotelApprovalStatus.PENDING, nullable: false }),
86
+ __metadata("design:type", String)
87
+ ], HotelApprovalDetails.prototype, "approval_status", void 0);
88
+ exports.HotelApprovalDetails = HotelApprovalDetails = __decorate([
89
+ (0, typeorm_1.Entity)({ name: 'hotelapprovals' }),
90
+ __metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object, Object, Object, Number, Number])
91
+ ], HotelApprovalDetails);
@@ -0,0 +1,14 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class HotelRequestAttachment 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
+ uploaded_by: number;
12
+ description: string;
13
+ constructor(request_id: number, uploaded_by: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number, chat_id?: number, description?: string);
14
+ }
@@ -0,0 +1,74 @@
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.HotelRequestAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let HotelRequestAttachment = class HotelRequestAttachment extends BaseModel_1.BaseModel {
16
+ constructor(request_id, uploaded_by, file_url, file_name, file_type, file_size, service_id, sub_service_id, chat_id, description) {
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
+ this.uploaded_by = uploaded_by;
27
+ this.description = description || '';
28
+ }
29
+ };
30
+ exports.HotelRequestAttachment = HotelRequestAttachment;
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], HotelRequestAttachment.prototype, "request_id", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], HotelRequestAttachment.prototype, "service_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], HotelRequestAttachment.prototype, "sub_service_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
45
+ __metadata("design:type", String)
46
+ ], HotelRequestAttachment.prototype, "file_url", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], HotelRequestAttachment.prototype, "file_name", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
53
+ __metadata("design:type", String)
54
+ ], HotelRequestAttachment.prototype, "file_type", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
57
+ __metadata("design:type", Object)
58
+ ], HotelRequestAttachment.prototype, "file_size", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
61
+ __metadata("design:type", Object)
62
+ ], HotelRequestAttachment.prototype, "chat_id", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
65
+ __metadata("design:type", Number)
66
+ ], HotelRequestAttachment.prototype, "uploaded_by", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
69
+ __metadata("design:type", String)
70
+ ], HotelRequestAttachment.prototype, "description", void 0);
71
+ exports.HotelRequestAttachment = HotelRequestAttachment = __decorate([
72
+ (0, typeorm_1.Entity)({ name: 'hotel_request_attachments' }),
73
+ __metadata("design:paramtypes", [Number, Number, String, String, String, Number, Number, Number, Number, String])
74
+ ], HotelRequestAttachment);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum HotelMessageTypes {
3
+ TEXT = "text",
4
+ IMAGE = "image",
5
+ VIDEO = "video",
6
+ FILE = "file",
7
+ LINK = "link"
8
+ }
9
+ export declare class HotelRequestChat 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: HotelMessageTypes;
16
+ constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: HotelMessageTypes);
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.HotelRequestChat = exports.HotelMessageTypes = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var HotelMessageTypes;
16
+ (function (HotelMessageTypes) {
17
+ HotelMessageTypes["TEXT"] = "text";
18
+ HotelMessageTypes["IMAGE"] = "image";
19
+ HotelMessageTypes["VIDEO"] = "video";
20
+ HotelMessageTypes["FILE"] = "file";
21
+ HotelMessageTypes["LINK"] = "link";
22
+ })(HotelMessageTypes || (exports.HotelMessageTypes = HotelMessageTypes = {}));
23
+ let HotelRequestChat = class HotelRequestChat 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 || HotelMessageTypes.TEXT;
32
+ }
33
+ };
34
+ exports.HotelRequestChat = HotelRequestChat;
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
37
+ __metadata("design:type", Number)
38
+ ], HotelRequestChat.prototype, "request_id", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], HotelRequestChat.prototype, "service_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], HotelRequestChat.prototype, "sub_service_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
49
+ __metadata("design:type", Number)
50
+ ], HotelRequestChat.prototype, "user_id", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
53
+ __metadata("design:type", String)
54
+ ], HotelRequestChat.prototype, "message", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({
57
+ type: 'enum',
58
+ enum: HotelMessageTypes,
59
+ default: HotelMessageTypes.TEXT,
60
+ nullable: false
61
+ }),
62
+ __metadata("design:type", String)
63
+ ], HotelRequestChat.prototype, "messageType", void 0);
64
+ exports.HotelRequestChat = HotelRequestChat = __decorate([
65
+ (0, typeorm_1.Entity)({ name: 'Hotel_request_chat' }),
66
+ __metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
67
+ ], HotelRequestChat);
@@ -0,0 +1,14 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum HotelWorkFlowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class HotelWorkFlow extends BaseModel {
8
+ request_id: number;
9
+ service_id: number | null;
10
+ sub_service_id: number | null;
11
+ content: string;
12
+ status: HotelWorkFlowStatus;
13
+ constructor(request_id: number, content: string, status: HotelWorkFlowStatus, service_id?: number, sub_service_id?: number);
14
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HotelWorkFlow = exports.HotelWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var HotelWorkFlowStatus;
16
+ (function (HotelWorkFlowStatus) {
17
+ HotelWorkFlowStatus["COMPLETED"] = "Completed";
18
+ HotelWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ HotelWorkFlowStatus["PENDING"] = "Pending";
20
+ })(HotelWorkFlowStatus || (exports.HotelWorkFlowStatus = HotelWorkFlowStatus = {}));
21
+ //This model is used to store the logistics workflow status and activity logs
22
+ let HotelWorkFlow = class HotelWorkFlow extends BaseModel_1.BaseModel {
23
+ constructor(request_id, content, status, service_id, sub_service_id) {
24
+ super();
25
+ this.request_id = request_id;
26
+ this.service_id = service_id || null;
27
+ this.sub_service_id = sub_service_id || null;
28
+ this.content = content;
29
+ this.status = status;
30
+ }
31
+ };
32
+ exports.HotelWorkFlow = HotelWorkFlow;
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], HotelWorkFlow.prototype, "request_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], HotelWorkFlow.prototype, "service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], HotelWorkFlow.prototype, "sub_service_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], HotelWorkFlow.prototype, "content", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'enum', enum: HotelWorkFlowStatus, default: HotelWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
51
+ __metadata("design:type", String)
52
+ ], HotelWorkFlow.prototype, "status", void 0);
53
+ exports.HotelWorkFlow = HotelWorkFlow = __decorate([
54
+ (0, typeorm_1.Entity)({ name: 'hotel_workflows' }),
55
+ __metadata("design:paramtypes", [Number, String, String, Number, Number])
56
+ ], HotelWorkFlow);
@@ -0,0 +1,45 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum MealType {
3
+ BREAKFAST = "Breakfast",
4
+ LUNCH = "Lunch",
5
+ DINNER = "Dinner"
6
+ }
7
+ export declare enum ServiceTypes {
8
+ LAUNDRY = "Laundry",
9
+ TELEPHONE = "Telephone Service"
10
+ }
11
+ export declare enum HotelReservationStatus {
12
+ PENDING = "Pending",
13
+ APPROVED = "Approved",
14
+ REJECTED = "Rejected",
15
+ IN_PROGRESS = "In Progress"
16
+ }
17
+ export declare class HotelReservation 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
+ service_type: string | null;
23
+ workflow_execution_id: string | null;
24
+ status: HotelReservationStatus;
25
+ user_id: number;
26
+ type_of_accommodation: string;
27
+ price: number;
28
+ meal: MealType;
29
+ service: ServiceTypes;
30
+ date_of_request: Date;
31
+ hotel_name: string;
32
+ check_in_date: Date;
33
+ check_in_time: string;
34
+ check_out_date: Date;
35
+ booking_date: Date | null;
36
+ check_out_time: string;
37
+ number_of_guests: number;
38
+ description: string;
39
+ attachment_url: string | null;
40
+ requested_by: string;
41
+ visitor_name: string | null;
42
+ hr_approval: boolean;
43
+ pr_approval: boolean;
44
+ constructor(type_of_accommodation: string, price: number, meal: MealType, service: ServiceTypes, date_of_request: Date, hotel_name: string, check_in_date: Date, booking_date: Date | null, check_in_time: string, check_out_date: Date, check_out_time: string, number_of_guests: number, description: string, requested_by: string, visitor_name: string, user_id: number, status?: HotelReservationStatus, hr_approval?: boolean, pr_approval?: boolean, service_id?: number | null, sub_service_id?: number | null, service_type?: string | null, workflow_execution_id?: string | null, req_user_department_id?: number | null, req_user_section_id?: number | null, attachment_url?: string | null);
45
+ }
@@ -0,0 +1,177 @@
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.HotelReservation = exports.HotelReservationStatus = exports.ServiceTypes = exports.MealType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var MealType;
16
+ (function (MealType) {
17
+ MealType["BREAKFAST"] = "Breakfast";
18
+ MealType["LUNCH"] = "Lunch";
19
+ MealType["DINNER"] = "Dinner";
20
+ })(MealType || (exports.MealType = MealType = {}));
21
+ var ServiceTypes;
22
+ (function (ServiceTypes) {
23
+ ServiceTypes["LAUNDRY"] = "Laundry";
24
+ ServiceTypes["TELEPHONE"] = "Telephone Service";
25
+ })(ServiceTypes || (exports.ServiceTypes = ServiceTypes = {}));
26
+ var HotelReservationStatus;
27
+ (function (HotelReservationStatus) {
28
+ HotelReservationStatus["PENDING"] = "Pending";
29
+ HotelReservationStatus["APPROVED"] = "Approved";
30
+ HotelReservationStatus["REJECTED"] = "Rejected";
31
+ HotelReservationStatus["IN_PROGRESS"] = "In Progress";
32
+ })(HotelReservationStatus || (exports.HotelReservationStatus = HotelReservationStatus = {}));
33
+ let HotelReservation = class HotelReservation extends BaseModel_1.BaseModel {
34
+ constructor(type_of_accommodation, price, meal, service, date_of_request, hotel_name, check_in_date, booking_date, check_in_time, check_out_date, check_out_time, number_of_guests, description, requested_by, visitor_name, user_id, status = HotelReservationStatus.PENDING, hr_approval = false, pr_approval = false, service_id, sub_service_id, service_type, workflow_execution_id, req_user_department_id, req_user_section_id, attachment_url) {
35
+ super();
36
+ this.type_of_accommodation = type_of_accommodation;
37
+ this.price = price;
38
+ this.meal = meal;
39
+ this.service = service;
40
+ this.date_of_request = date_of_request;
41
+ this.hotel_name = hotel_name;
42
+ this.check_in_date = check_in_date;
43
+ this.check_in_time = check_in_time;
44
+ this.check_out_date = check_out_date;
45
+ this.check_out_time = check_out_time;
46
+ this.number_of_guests = number_of_guests;
47
+ this.description = description;
48
+ this.requested_by = requested_by;
49
+ this.visitor_name = visitor_name;
50
+ this.user_id = user_id;
51
+ this.status = status;
52
+ this.hr_approval = hr_approval;
53
+ this.pr_approval = pr_approval;
54
+ this.service_id = service_id ?? null;
55
+ this.sub_service_id = sub_service_id ?? null;
56
+ this.service_type = service_type ?? null;
57
+ this.workflow_execution_id = workflow_execution_id ?? null;
58
+ this.req_user_department_id = req_user_department_id ?? null;
59
+ this.req_user_section_id = req_user_section_id ?? null;
60
+ this.attachment_url = attachment_url ?? null;
61
+ this.booking_date = booking_date ?? null;
62
+ }
63
+ };
64
+ exports.HotelReservation = HotelReservation;
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], HotelReservation.prototype, "req_user_department_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], HotelReservation.prototype, "req_user_section_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], HotelReservation.prototype, "service_id", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
79
+ __metadata("design:type", Object)
80
+ ], HotelReservation.prototype, "sub_service_id", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: true }),
83
+ __metadata("design:type", Object)
84
+ ], HotelReservation.prototype, "service_type", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
87
+ __metadata("design:type", Object)
88
+ ], HotelReservation.prototype, "workflow_execution_id", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({
91
+ type: "enum",
92
+ enum: HotelReservationStatus,
93
+ default: HotelReservationStatus.PENDING,
94
+ nullable: false,
95
+ }),
96
+ __metadata("design:type", String)
97
+ ], HotelReservation.prototype, "status", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.Column)({ nullable: false }),
100
+ __metadata("design:type", Number)
101
+ ], HotelReservation.prototype, "user_id", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50 }),
104
+ __metadata("design:type", String)
105
+ ], HotelReservation.prototype, "type_of_accommodation", void 0);
106
+ __decorate([
107
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
108
+ __metadata("design:type", Number)
109
+ ], HotelReservation.prototype, "price", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.Column)({ type: 'enum', enum: MealType, nullable: false, }),
112
+ __metadata("design:type", String)
113
+ ], HotelReservation.prototype, "meal", void 0);
114
+ __decorate([
115
+ (0, typeorm_1.Column)({ type: 'enum', enum: ServiceTypes, nullable: false, }),
116
+ __metadata("design:type", String)
117
+ ], HotelReservation.prototype, "service", void 0);
118
+ __decorate([
119
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: false }),
120
+ __metadata("design:type", Date)
121
+ ], HotelReservation.prototype, "date_of_request", void 0);
122
+ __decorate([
123
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
124
+ __metadata("design:type", String)
125
+ ], HotelReservation.prototype, "hotel_name", void 0);
126
+ __decorate([
127
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
128
+ __metadata("design:type", Date)
129
+ ], HotelReservation.prototype, "check_in_date", void 0);
130
+ __decorate([
131
+ (0, typeorm_1.Column)({ type: 'time', nullable: false }),
132
+ __metadata("design:type", String)
133
+ ], HotelReservation.prototype, "check_in_time", void 0);
134
+ __decorate([
135
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
136
+ __metadata("design:type", Date)
137
+ ], HotelReservation.prototype, "check_out_date", void 0);
138
+ __decorate([
139
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
140
+ __metadata("design:type", Object)
141
+ ], HotelReservation.prototype, "booking_date", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.Column)({ type: 'time', nullable: false }),
144
+ __metadata("design:type", String)
145
+ ], HotelReservation.prototype, "check_out_time", void 0);
146
+ __decorate([
147
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
148
+ __metadata("design:type", Number)
149
+ ], HotelReservation.prototype, "number_of_guests", void 0);
150
+ __decorate([
151
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
152
+ __metadata("design:type", String)
153
+ ], HotelReservation.prototype, "description", void 0);
154
+ __decorate([
155
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
156
+ __metadata("design:type", Object)
157
+ ], HotelReservation.prototype, "attachment_url", void 0);
158
+ __decorate([
159
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
160
+ __metadata("design:type", String)
161
+ ], HotelReservation.prototype, "requested_by", void 0);
162
+ __decorate([
163
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
164
+ __metadata("design:type", Object)
165
+ ], HotelReservation.prototype, "visitor_name", void 0);
166
+ __decorate([
167
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
168
+ __metadata("design:type", Boolean)
169
+ ], HotelReservation.prototype, "hr_approval", void 0);
170
+ __decorate([
171
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
172
+ __metadata("design:type", Boolean)
173
+ ], HotelReservation.prototype, "pr_approval", void 0);
174
+ exports.HotelReservation = HotelReservation = __decorate([
175
+ (0, typeorm_1.Entity)({ name: 'hotelreservations' }),
176
+ __metadata("design:paramtypes", [String, Number, String, String, Date, String, Date, Object, String, Date, String, Number, String, String, String, Number, String, Boolean, Boolean, Object, Object, Object, Object, Object, Object, Object])
177
+ ], HotelReservation);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.2.20",
3
+ "version": "2.2.22",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -47,6 +47,11 @@ import { VpnWorkFlow } from './models/VpnWorkflowModel';
47
47
  import { VpnRequestAttachment } from './models/VpnRequestAttachmentModel';
48
48
  import { VpnRequestChat } from './models/VpnRequestChatModel';
49
49
 
50
+ import { HotelReservation } from './models/HotelreservationModel'
51
+ import { HotelApprovalDetails } from './models/HotelApprovalModel';
52
+ import { HotelWorkFlow } from './models/HotelWorkFlowModel';
53
+ import { HotelRequestChat } from './models/HotelChatModel';
54
+ import { HotelRequestAttachment } from './models/HotelAttachedModel';
50
55
 
51
56
  export const AppDataSource = new DataSource({
52
57
  type: 'postgres',
@@ -100,6 +105,11 @@ export const AppDataSource = new DataSource({
100
105
  VpnApprovalDetails,
101
106
  VpnWorkFlow,
102
107
  VpnRequestAttachment,
103
- VpnRequestChat
108
+ VpnRequestChat,
109
+ HotelReservation,
110
+ HotelApprovalDetails,
111
+ HotelWorkFlow,
112
+ HotelRequestChat,
113
+ HotelRequestAttachment
104
114
  ],
105
115
  });
package/src/index.ts CHANGED
@@ -42,3 +42,8 @@ export * from './models/VpnApprovalModel';
42
42
  export * from './models/VpnWorkflowModel';
43
43
  export * from './models/VpnRequestChatModel';
44
44
  export * from './models/VpnRequestAttachmentModel';
45
+ export * from './models/HotelreservationModel';
46
+ export * from './models/HotelApprovalModel';
47
+ export * from './models/HotelWorkFlowModel';
48
+ export * from './models/HotelChatModel';
49
+ export * from './models/HotelAttachedModel';
@@ -0,0 +1,79 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+
5
+ export enum HotelApprovalStatus {
6
+ PENDING = "Pending",
7
+ IN_PROGRESS = "In Progress",
8
+ APPROVED = "Approved",
9
+ REJECTED = "Rejected"
10
+ }
11
+
12
+ @Entity({ name: 'hotelapprovals' })
13
+
14
+ export class HotelApprovalDetails extends BaseModel {
15
+ @Column({ type: 'integer', nullable: false })
16
+ request_id: number;
17
+
18
+ @Column({ type: 'integer', nullable: true })
19
+ service_id: number | null;
20
+
21
+ @Column({ type: 'integer', nullable: true })
22
+ sub_service_id: number | null;
23
+
24
+ @Column({ type: 'integer', nullable: false })
25
+ level: number;
26
+
27
+ @Column({ type: 'integer', nullable: false })
28
+ approver_role_id: number;
29
+
30
+ @Column({ type: 'integer', nullable: true })
31
+ department_id: number | null;
32
+
33
+ @Column({ type: 'integer', nullable: true })
34
+ section_id: number | null;
35
+
36
+ @Column({ type: 'integer', nullable: true })
37
+ approver_user_id: number | null;
38
+
39
+ @Column({ type: 'integer', nullable: true })
40
+ delegate_user_id: number | null;
41
+
42
+ @Column({ type: 'integer', nullable: true })
43
+ approved_by: number | null;
44
+
45
+ @Column({ type: 'varchar', length: 500, nullable: true, default: '' })
46
+ comment: string;
47
+
48
+ @Column({ type: 'enum', enum: HotelApprovalStatus,default: HotelApprovalStatus.PENDING, nullable: false })
49
+ approval_status: HotelApprovalStatus;
50
+
51
+ constructor(
52
+ request_id: number,
53
+ approver_role_id: number,
54
+ comment: string,
55
+ approval_status: HotelApprovalStatus,
56
+ level: number,
57
+ department_id?: number | null,
58
+ section_id?: number | null,
59
+ approver_user_id?: number | null,
60
+ delegate_user_id?: number | null,
61
+ approved_by?: number | null,
62
+ service_id?: number,
63
+ sub_service_id?: number
64
+ ) {
65
+ super();
66
+ this.request_id = request_id;
67
+ this.service_id = service_id || null;
68
+ this.sub_service_id = sub_service_id || null;
69
+ this.approver_role_id = approver_role_id;
70
+ this.comment = comment;
71
+ this.approval_status = approval_status;
72
+ this.level = level;
73
+ this.department_id = department_id || null;
74
+ this.section_id = section_id || null;
75
+ this.approver_user_id = approver_user_id || null;
76
+ this.delegate_user_id = delegate_user_id || null;
77
+ this.approved_by = approved_by || null;
78
+ }
79
+ }
@@ -0,0 +1,64 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+
5
+ @Entity({ name: 'hotel_request_attachments' })
6
+ export class HotelRequestAttachment extends BaseModel {
7
+
8
+ @Column({ type: 'integer', nullable: false })
9
+ request_id: number;
10
+
11
+ @Column({ type: 'integer', nullable: true })
12
+ service_id: number | null;
13
+
14
+ @Column({ type: 'integer', nullable: true })
15
+ sub_service_id: number | null;
16
+
17
+ @Column({ type: 'varchar', length: 500, nullable: false })
18
+ file_url: string;
19
+
20
+ @Column({ type: 'varchar', length: 255, nullable: true })
21
+ file_name: string;
22
+
23
+ @Column({ type: 'varchar', length: 100, nullable: true })
24
+ file_type: string;
25
+
26
+ @Column({ type: 'bigint', nullable: true })
27
+ file_size: number | null;
28
+
29
+ @Column({ type: 'integer', nullable: true })
30
+ chat_id: number | null;
31
+
32
+ @Column({ type: "integer", nullable: false })
33
+ uploaded_by: number;
34
+
35
+ @Column({ type: "text", nullable: true })
36
+ description: string;
37
+
38
+
39
+ constructor(
40
+ request_id: number,
41
+ uploaded_by: number,
42
+ file_url: string,
43
+ file_name?: string,
44
+ file_type?: string,
45
+ file_size?: number,
46
+ service_id?: number,
47
+ sub_service_id?: number,
48
+ chat_id?: number,
49
+ description?: string
50
+ ) {
51
+ super();
52
+ this.request_id = request_id;
53
+ this.service_id = service_id || null;
54
+ this.sub_service_id = sub_service_id || null;
55
+ this.file_url = file_url;
56
+ this.file_name = file_name || '';
57
+ this.file_type = file_type || '';
58
+ this.file_size = file_size || null;
59
+ this.chat_id = chat_id || null;
60
+ this.uploaded_by = uploaded_by;
61
+ this.description = description || '';
62
+ }
63
+ }
64
+
@@ -0,0 +1,55 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum HotelMessageTypes {
5
+ TEXT = "text",
6
+ IMAGE = "image",
7
+ VIDEO = "video",
8
+ FILE = "file",
9
+ LINK = "link"
10
+ }
11
+
12
+ @Entity({ name: 'Hotel_request_chat' })
13
+ export class HotelRequestChat extends BaseModel {
14
+
15
+ @Column({ type: 'integer', nullable: false })
16
+ request_id: number;
17
+
18
+ @Column({ type: 'integer', nullable: true })
19
+ service_id: number | null;
20
+
21
+ @Column({ type: 'integer', nullable: true })
22
+ sub_service_id: number | null;
23
+
24
+ @Column({ type: 'integer', nullable: false })
25
+ user_id: number;
26
+
27
+ @Column({ type: 'text', nullable: false })
28
+ message: string;
29
+
30
+ @Column({
31
+ type: 'enum',
32
+ enum: HotelMessageTypes,
33
+ default: HotelMessageTypes.TEXT,
34
+ nullable: false
35
+ })
36
+ messageType: HotelMessageTypes;
37
+
38
+ constructor(
39
+ request_id: number,
40
+ user_id: number,
41
+ message: string,
42
+ service_id?: number,
43
+ sub_service_id?: number,
44
+ messageType?: HotelMessageTypes
45
+ ) {
46
+ super();
47
+ this.request_id = request_id;
48
+ this.service_id = service_id || null;
49
+ this.sub_service_id = sub_service_id || null;
50
+ this.user_id = user_id;
51
+ this.message = message;
52
+ this.messageType = messageType || HotelMessageTypes.TEXT;
53
+ }
54
+ }
55
+
@@ -0,0 +1,42 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum HotelWorkFlowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending"
8
+ }
9
+
10
+ //This model is used to store the logistics workflow status and activity logs
11
+ @Entity({ name: 'hotel_workflows' })
12
+ export class HotelWorkFlow 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: 'varchar', length: 500, nullable: false })
23
+ content: string;
24
+
25
+ @Column({ type: 'enum', enum: HotelWorkFlowStatus, default: HotelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
26
+ status: HotelWorkFlowStatus;
27
+
28
+ constructor(
29
+ request_id: number,
30
+ content: string,
31
+ status: HotelWorkFlowStatus,
32
+ service_id?: number,
33
+ sub_service_id?: number
34
+ ) {
35
+ super();
36
+ this.request_id = request_id;
37
+ this.service_id = service_id || null;
38
+ this.sub_service_id = sub_service_id || null;
39
+ this.content = content;
40
+ this.status = status;
41
+ }
42
+ }
@@ -0,0 +1,166 @@
1
+ import { Entity, Column } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MealType {
5
+ BREAKFAST = "Breakfast",
6
+ LUNCH = "Lunch",
7
+ DINNER = "Dinner",
8
+ }
9
+
10
+ export enum ServiceTypes {
11
+ LAUNDRY = "Laundry",
12
+ TELEPHONE = "Telephone Service",
13
+ }
14
+
15
+ export enum HotelReservationStatus {
16
+ PENDING = "Pending",
17
+ APPROVED = "Approved",
18
+ REJECTED = "Rejected",
19
+ IN_PROGRESS = "In Progress"
20
+ }
21
+
22
+ @Entity({ name:'hotelreservations'})
23
+ export class HotelReservation extends BaseModel {
24
+ // Workflow fields (similar to IT Help Desk)
25
+ @Column({ type: 'int', nullable: true })
26
+ req_user_department_id: number | null;
27
+
28
+ @Column({ type: 'int', nullable: true })
29
+ req_user_section_id: number | null;
30
+
31
+ @Column({ type: 'int', nullable: true })
32
+ service_id: number | null;
33
+
34
+ @Column({ type: 'int', nullable: true })
35
+ sub_service_id: number | null;
36
+
37
+ @Column({ type: 'varchar', length: 20, nullable: true })
38
+ service_type: string | null; // 'internal' or 'external'
39
+
40
+ @Column({ type: 'varchar', nullable: true })
41
+ workflow_execution_id: string | null;
42
+
43
+ @Column({
44
+ type: "enum",
45
+ enum: HotelReservationStatus,
46
+ default: HotelReservationStatus.PENDING,
47
+ nullable: false,
48
+ })
49
+ status: HotelReservationStatus;
50
+
51
+ @Column({ nullable: false })
52
+ user_id: number;
53
+
54
+ // Hotel reservation specific fields
55
+ @Column({ type: 'varchar', length: 50 })
56
+ type_of_accommodation: string;
57
+
58
+ @Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
59
+ price: number;
60
+
61
+ @Column({ type: 'enum', enum: MealType, nullable: false, })
62
+ meal: MealType;
63
+
64
+ @Column({ type: 'enum', enum: ServiceTypes, nullable: false, })
65
+ service: ServiceTypes;
66
+
67
+ @Column({ type: 'timestamptz', nullable: false })
68
+ date_of_request: Date;
69
+
70
+ @Column({ type: 'varchar', length: 100, nullable: false })
71
+ hotel_name: string;
72
+
73
+ @Column({ type: 'date', nullable: false })
74
+ check_in_date: Date;
75
+
76
+ @Column({ type: 'time', nullable: false })
77
+ check_in_time: string;
78
+
79
+ @Column({ type: 'date', nullable: false })
80
+ check_out_date: Date;
81
+
82
+ @Column({ type: 'date', nullable: true })
83
+ booking_date: Date | null;
84
+
85
+ @Column({ type: 'time', nullable: false })
86
+ check_out_time: string;
87
+
88
+ @Column({ type: 'int', nullable: false })
89
+ number_of_guests: number;
90
+
91
+ @Column({ type: 'text', nullable: true })
92
+ description: string;
93
+
94
+ @Column({ type: 'text', nullable: true })
95
+ attachment_url: string | null;
96
+
97
+ @Column({ type: 'varchar', length: 100, nullable: false })
98
+ requested_by: string;
99
+
100
+ @Column({ type: 'varchar', length: 100, nullable: true })
101
+ visitor_name: string | null;
102
+
103
+ @Column({ type: 'boolean', default: false })
104
+ hr_approval: boolean;
105
+
106
+ @Column({ type: 'boolean', default: false })
107
+ pr_approval: boolean;
108
+
109
+
110
+ constructor(
111
+ type_of_accommodation: string,
112
+ price: number,
113
+ meal: MealType,
114
+ service: ServiceTypes,
115
+ date_of_request: Date,
116
+ hotel_name: string,
117
+ check_in_date: Date,
118
+ booking_date: Date | null,
119
+ check_in_time: string,
120
+ check_out_date: Date,
121
+ check_out_time: string,
122
+ number_of_guests: number,
123
+ description: string,
124
+ requested_by: string,
125
+ visitor_name: string,
126
+ user_id: number,
127
+ status: HotelReservationStatus = HotelReservationStatus.PENDING,
128
+ hr_approval: boolean = false,
129
+ pr_approval: boolean = false,
130
+ service_id?: number | null,
131
+ sub_service_id?: number | null,
132
+ service_type?: string | null,
133
+ workflow_execution_id?: string | null,
134
+ req_user_department_id?: number | null,
135
+ req_user_section_id?: number | null,
136
+ attachment_url?: string | null
137
+ ) {
138
+ super();
139
+ this.type_of_accommodation = type_of_accommodation;
140
+ this.price = price;
141
+ this.meal = meal;
142
+ this.service = service;
143
+ this.date_of_request = date_of_request;
144
+ this.hotel_name = hotel_name;
145
+ this.check_in_date = check_in_date;
146
+ this.check_in_time = check_in_time;
147
+ this.check_out_date = check_out_date;
148
+ this.check_out_time = check_out_time;
149
+ this.number_of_guests = number_of_guests;
150
+ this.description = description;
151
+ this.requested_by = requested_by;
152
+ this.visitor_name = visitor_name;
153
+ this.user_id = user_id;
154
+ this.status = status;
155
+ this.hr_approval = hr_approval;
156
+ this.pr_approval = pr_approval;
157
+ this.service_id = service_id ?? null;
158
+ this.sub_service_id = sub_service_id ?? null;
159
+ this.service_type = service_type ?? null;
160
+ this.workflow_execution_id = workflow_execution_id ?? null;
161
+ this.req_user_department_id = req_user_department_id ?? null;
162
+ this.req_user_section_id = req_user_section_id ?? null;
163
+ this.attachment_url = attachment_url ?? null;
164
+ this.booking_date = booking_date ?? null;
165
+ }
166
+ }