@platform-modules/civil-aviation-authority 2.3.101 → 2.3.102

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.
@@ -141,6 +141,11 @@ const ResidentialUnitRentalWorkflowModel_1 = require("./models/ResidentialUnitRe
141
141
  const ResidentialUnitRentalApprovalModel_1 = require("./models/ResidentialUnitRentalApprovalModel");
142
142
  const ResidentialUnitRentalChatModel_1 = require("./models/ResidentialUnitRentalChatModel");
143
143
  const ResidentialUnitRentalAttachmentModel_1 = require("./models/ResidentialUnitRentalAttachmentModel");
144
+ const AccommodationRequestModel_1 = require("./models/AccommodationRequestModel");
145
+ const AccommodationWorkflowModel_1 = require("./models/AccommodationWorkflowModel");
146
+ const AccommodationApprovalModel_1 = require("./models/AccommodationApprovalModel");
147
+ const AccommodationChatModel_1 = require("./models/AccommodationChatModel");
148
+ const AccommodationAttachmentModel_1 = require("./models/AccommodationAttachmentModel");
144
149
  exports.AppDataSource = new typeorm_1.DataSource({
145
150
  type: 'postgres',
146
151
  host: process.env.DB_HOST || 'localhost',
@@ -280,6 +285,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
280
285
  ResidentialUnitRentalApprovalModel_1.ResidentialUnitRentalApproval,
281
286
  ResidentialUnitRentalChatModel_1.ResidentialUnitRentalChat,
282
287
  ResidentialUnitRentalAttachmentModel_1.ResidentialUnitRentalAttachment,
288
+ AccommodationRequestModel_1.AccommodationRequest,
289
+ AccommodationWorkflowModel_1.AccommodationWorkflow,
290
+ AccommodationApprovalModel_1.AccommodationApproval,
291
+ AccommodationChatModel_1.AccommodationChat,
292
+ AccommodationAttachmentModel_1.AccommodationAttachment,
283
293
  DocumentModel_1.Document,
284
294
  DocumentFolderModel_1.DocumentFolder,
285
295
  DocumentTypeModel_1.DocumentType,
package/dist/index.d.ts CHANGED
@@ -226,6 +226,11 @@ export * from './models/ResidentialUnitRentalWorkflowModel';
226
226
  export * from './models/ResidentialUnitRentalApprovalModel';
227
227
  export * from './models/ResidentialUnitRentalChatModel';
228
228
  export * from './models/ResidentialUnitRentalAttachmentModel';
229
+ export * from './models/AccommodationRequestModel';
230
+ export * from './models/AccommodationWorkflowModel';
231
+ export * from './models/AccommodationApprovalModel';
232
+ export * from './models/AccommodationChatModel';
233
+ export * from './models/AccommodationAttachmentModel';
229
234
  export * from './models/HousingContractRenewalRequestModel';
230
235
  export * from './models/HousingContractRenewalWorkflowModel';
231
236
  export * from './models/HousingContractRenewalApprovalModel';
package/dist/index.js CHANGED
@@ -342,6 +342,12 @@ __exportStar(require("./models/ResidentialUnitRentalWorkflowModel"), exports);
342
342
  __exportStar(require("./models/ResidentialUnitRentalApprovalModel"), exports);
343
343
  __exportStar(require("./models/ResidentialUnitRentalChatModel"), exports);
344
344
  __exportStar(require("./models/ResidentialUnitRentalAttachmentModel"), exports);
345
+ // Accommodation Request Service (Request for Accommodation in Muscat Governorate)
346
+ __exportStar(require("./models/AccommodationRequestModel"), exports);
347
+ __exportStar(require("./models/AccommodationWorkflowModel"), exports);
348
+ __exportStar(require("./models/AccommodationApprovalModel"), exports);
349
+ __exportStar(require("./models/AccommodationChatModel"), exports);
350
+ __exportStar(require("./models/AccommodationAttachmentModel"), exports);
345
351
  // Housing Contract Renewal (CAA042)
346
352
  __exportStar(require("./models/HousingContractRenewalRequestModel"), exports);
347
353
  __exportStar(require("./models/HousingContractRenewalWorkflowModel"), exports);
@@ -0,0 +1,24 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccommodationApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected",
7
+ ASSIGNED = "Assigned"
8
+ }
9
+ export declare class AccommodationApproval extends BaseModel {
10
+ request_id: number;
11
+ service_id: number;
12
+ sub_service_id: number;
13
+ approver_role_id: number;
14
+ approver_user_id: number;
15
+ delegate_user_id: number;
16
+ approved_by: number;
17
+ department_id: number;
18
+ section_id: number;
19
+ level: number;
20
+ approval_status: AccommodationApprovalStatus;
21
+ comment: string;
22
+ created_by: number;
23
+ constructor();
24
+ }
@@ -0,0 +1,89 @@
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.AccommodationApproval = exports.AccommodationApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccommodationApprovalStatus;
16
+ (function (AccommodationApprovalStatus) {
17
+ AccommodationApprovalStatus["PENDING"] = "Pending";
18
+ AccommodationApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ AccommodationApprovalStatus["APPROVED"] = "Approved";
20
+ AccommodationApprovalStatus["REJECTED"] = "Rejected";
21
+ AccommodationApprovalStatus["ASSIGNED"] = "Assigned";
22
+ })(AccommodationApprovalStatus || (exports.AccommodationApprovalStatus = AccommodationApprovalStatus = {}));
23
+ let AccommodationApproval = class AccommodationApproval extends BaseModel_1.BaseModel {
24
+ constructor() {
25
+ super();
26
+ }
27
+ };
28
+ exports.AccommodationApproval = AccommodationApproval;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AccommodationApproval.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], AccommodationApproval.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], AccommodationApproval.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], AccommodationApproval.prototype, "approver_role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
47
+ __metadata("design:type", Number)
48
+ ], AccommodationApproval.prototype, "approver_user_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
51
+ __metadata("design:type", Number)
52
+ ], AccommodationApproval.prototype, "delegate_user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
55
+ __metadata("design:type", Number)
56
+ ], AccommodationApproval.prototype, "approved_by", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], AccommodationApproval.prototype, "department_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
63
+ __metadata("design:type", Number)
64
+ ], AccommodationApproval.prototype, "section_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], AccommodationApproval.prototype, "level", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: 'enum',
72
+ enum: AccommodationApprovalStatus,
73
+ default: AccommodationApprovalStatus.PENDING,
74
+ nullable: false
75
+ }),
76
+ __metadata("design:type", String)
77
+ ], AccommodationApproval.prototype, "approval_status", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
80
+ __metadata("design:type", String)
81
+ ], AccommodationApproval.prototype, "comment", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
84
+ __metadata("design:type", Number)
85
+ ], AccommodationApproval.prototype, "created_by", void 0);
86
+ exports.AccommodationApproval = AccommodationApproval = __decorate([
87
+ (0, typeorm_1.Entity)({ name: 'accommodation_approvals' }),
88
+ __metadata("design:paramtypes", [])
89
+ ], AccommodationApproval);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare class AccommodationAttachment extends BaseModel {
3
+ request_id: number;
4
+ service_id: number;
5
+ sub_service_id: number;
6
+ file_name: string;
7
+ file_url: string;
8
+ file_type: string;
9
+ file_size: number;
10
+ mime_type: string;
11
+ file_path: string;
12
+ description: string;
13
+ uploaded_by: number;
14
+ created_by: number;
15
+ constructor();
16
+ }
@@ -0,0 +1,72 @@
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.AccommodationAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let AccommodationAttachment = class AccommodationAttachment extends BaseModel_1.BaseModel {
16
+ constructor() {
17
+ super();
18
+ }
19
+ };
20
+ exports.AccommodationAttachment = AccommodationAttachment;
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
23
+ __metadata("design:type", Number)
24
+ ], AccommodationAttachment.prototype, "request_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], AccommodationAttachment.prototype, "service_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AccommodationAttachment.prototype, "sub_service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
35
+ __metadata("design:type", String)
36
+ ], AccommodationAttachment.prototype, "file_name", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
39
+ __metadata("design:type", String)
40
+ ], AccommodationAttachment.prototype, "file_url", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
43
+ __metadata("design:type", String)
44
+ ], AccommodationAttachment.prototype, "file_type", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
47
+ __metadata("design:type", Number)
48
+ ], AccommodationAttachment.prototype, "file_size", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], AccommodationAttachment.prototype, "mime_type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], AccommodationAttachment.prototype, "file_path", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], AccommodationAttachment.prototype, "description", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
63
+ __metadata("design:type", Number)
64
+ ], AccommodationAttachment.prototype, "uploaded_by", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], AccommodationAttachment.prototype, "created_by", void 0);
69
+ exports.AccommodationAttachment = AccommodationAttachment = __decorate([
70
+ (0, typeorm_1.Entity)({ name: 'accommodation_attachments' }),
71
+ __metadata("design:paramtypes", [])
72
+ ], AccommodationAttachment);
@@ -0,0 +1,21 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccommodationMessageType {
3
+ text = "text",
4
+ image = "image",
5
+ video = "video",
6
+ file = "file",
7
+ link = "link"
8
+ }
9
+ export declare class AccommodationChat extends BaseModel {
10
+ request_id: number;
11
+ service_id: number;
12
+ sub_service_id: number;
13
+ user_id: number;
14
+ message: string;
15
+ message_type: string;
16
+ is_internal: boolean;
17
+ approver_role_id: number;
18
+ status: string;
19
+ created_by: number;
20
+ constructor();
21
+ }
@@ -0,0 +1,72 @@
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.AccommodationChat = exports.AccommodationMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccommodationMessageType;
16
+ (function (AccommodationMessageType) {
17
+ AccommodationMessageType["text"] = "text";
18
+ AccommodationMessageType["image"] = "image";
19
+ AccommodationMessageType["video"] = "video";
20
+ AccommodationMessageType["file"] = "file";
21
+ AccommodationMessageType["link"] = "link";
22
+ })(AccommodationMessageType || (exports.AccommodationMessageType = AccommodationMessageType = {}));
23
+ let AccommodationChat = class AccommodationChat extends BaseModel_1.BaseModel {
24
+ constructor() {
25
+ super();
26
+ }
27
+ };
28
+ exports.AccommodationChat = AccommodationChat;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AccommodationChat.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], AccommodationChat.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], AccommodationChat.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
43
+ __metadata("design:type", Number)
44
+ ], AccommodationChat.prototype, "user_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], AccommodationChat.prototype, "message", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: false }),
51
+ __metadata("design:type", String)
52
+ ], AccommodationChat.prototype, "message_type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'boolean', nullable: false, default: false }),
55
+ __metadata("design:type", Boolean)
56
+ ], AccommodationChat.prototype, "is_internal", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], AccommodationChat.prototype, "approver_role_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], AccommodationChat.prototype, "status", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], AccommodationChat.prototype, "created_by", void 0);
69
+ exports.AccommodationChat = AccommodationChat = __decorate([
70
+ (0, typeorm_1.Entity)({ name: 'accommodation_chat' }),
71
+ __metadata("design:paramtypes", [])
72
+ ], AccommodationChat);
@@ -0,0 +1,55 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccommodationRequestStatus {
3
+ Pending = "Pending",
4
+ Approved = "Approved",
5
+ Rejected = "Rejected",
6
+ InProgress = "In Progress",
7
+ Assigned = "Assigned",
8
+ Completed = "Completed"
9
+ }
10
+ export declare enum OfficialPurposeOfTravel {
11
+ Workshop = "Workshop",
12
+ Training = "Training",
13
+ DutyMission = "Duty Mission",
14
+ Assignment = "Assignment",
15
+ Other = "Other"
16
+ }
17
+ export declare enum AccommodationType {
18
+ Apartment = "Apartment",
19
+ Villa = "Villa",
20
+ SharedUnit = "Shared Unit"
21
+ }
22
+ export declare class AccommodationRequest extends BaseModel {
23
+ reference_number: string | null;
24
+ req_user_department_id: number | null;
25
+ req_user_section_id: number | null;
26
+ service_id: number;
27
+ sub_service_id: number;
28
+ workflow_execution_id: string | null;
29
+ user_id: number;
30
+ created_by: number;
31
+ official_purpose_of_travel: OfficialPurposeOfTravel;
32
+ other_purpose_specification: string | null;
33
+ accommodation_type_requested: AccommodationType;
34
+ start_date_of_stay: Date;
35
+ duration_of_days: number;
36
+ travel_from: string;
37
+ travel_to: string;
38
+ time_of_arrival: string;
39
+ travelling_from_region: string;
40
+ number_of_employees_travelling: number;
41
+ employee_details: Array<{
42
+ employee_id: string;
43
+ employee_name: string;
44
+ designation: string;
45
+ grade: string;
46
+ contact_number: string;
47
+ }>;
48
+ status: AccommodationRequestStatus;
49
+ description: string | null;
50
+ assigned_to_user_id: number | null;
51
+ approver_comment: string | null;
52
+ approved_by: number | null;
53
+ approved_at: Date | null;
54
+ constructor();
55
+ }
@@ -0,0 +1,160 @@
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.AccommodationRequest = exports.AccommodationType = exports.OfficialPurposeOfTravel = exports.AccommodationRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccommodationRequestStatus;
16
+ (function (AccommodationRequestStatus) {
17
+ AccommodationRequestStatus["Pending"] = "Pending";
18
+ AccommodationRequestStatus["Approved"] = "Approved";
19
+ AccommodationRequestStatus["Rejected"] = "Rejected";
20
+ AccommodationRequestStatus["InProgress"] = "In Progress";
21
+ AccommodationRequestStatus["Assigned"] = "Assigned";
22
+ AccommodationRequestStatus["Completed"] = "Completed";
23
+ })(AccommodationRequestStatus || (exports.AccommodationRequestStatus = AccommodationRequestStatus = {}));
24
+ var OfficialPurposeOfTravel;
25
+ (function (OfficialPurposeOfTravel) {
26
+ OfficialPurposeOfTravel["Workshop"] = "Workshop";
27
+ OfficialPurposeOfTravel["Training"] = "Training";
28
+ OfficialPurposeOfTravel["DutyMission"] = "Duty Mission";
29
+ OfficialPurposeOfTravel["Assignment"] = "Assignment";
30
+ OfficialPurposeOfTravel["Other"] = "Other";
31
+ })(OfficialPurposeOfTravel || (exports.OfficialPurposeOfTravel = OfficialPurposeOfTravel = {}));
32
+ var AccommodationType;
33
+ (function (AccommodationType) {
34
+ AccommodationType["Apartment"] = "Apartment";
35
+ AccommodationType["Villa"] = "Villa";
36
+ AccommodationType["SharedUnit"] = "Shared Unit";
37
+ })(AccommodationType || (exports.AccommodationType = AccommodationType = {}));
38
+ let AccommodationRequest = class AccommodationRequest extends BaseModel_1.BaseModel {
39
+ constructor() {
40
+ super();
41
+ }
42
+ };
43
+ exports.AccommodationRequest = AccommodationRequest;
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], AccommodationRequest.prototype, "reference_number", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], AccommodationRequest.prototype, "req_user_department_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], AccommodationRequest.prototype, "req_user_section_id", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
58
+ __metadata("design:type", Number)
59
+ ], AccommodationRequest.prototype, "service_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
62
+ __metadata("design:type", Number)
63
+ ], AccommodationRequest.prototype, "sub_service_id", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], AccommodationRequest.prototype, "workflow_execution_id", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
70
+ __metadata("design:type", Number)
71
+ ], AccommodationRequest.prototype, "user_id", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
74
+ __metadata("design:type", Number)
75
+ ], AccommodationRequest.prototype, "created_by", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({
78
+ type: 'enum',
79
+ enum: OfficialPurposeOfTravel,
80
+ nullable: false
81
+ }),
82
+ __metadata("design:type", String)
83
+ ], AccommodationRequest.prototype, "official_purpose_of_travel", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
86
+ __metadata("design:type", Object)
87
+ ], AccommodationRequest.prototype, "other_purpose_specification", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({
90
+ type: 'enum',
91
+ enum: AccommodationType,
92
+ nullable: false
93
+ }),
94
+ __metadata("design:type", String)
95
+ ], AccommodationRequest.prototype, "accommodation_type_requested", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
98
+ __metadata("design:type", Date)
99
+ ], AccommodationRequest.prototype, "start_date_of_stay", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
102
+ __metadata("design:type", Number)
103
+ ], AccommodationRequest.prototype, "duration_of_days", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
106
+ __metadata("design:type", String)
107
+ ], AccommodationRequest.prototype, "travel_from", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
110
+ __metadata("design:type", String)
111
+ ], AccommodationRequest.prototype, "travel_to", void 0);
112
+ __decorate([
113
+ (0, typeorm_1.Column)({ type: 'time', nullable: false }),
114
+ __metadata("design:type", String)
115
+ ], AccommodationRequest.prototype, "time_of_arrival", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
118
+ __metadata("design:type", String)
119
+ ], AccommodationRequest.prototype, "travelling_from_region", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
122
+ __metadata("design:type", Number)
123
+ ], AccommodationRequest.prototype, "number_of_employees_travelling", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.Column)({ type: 'json', nullable: false }),
126
+ __metadata("design:type", Array)
127
+ ], AccommodationRequest.prototype, "employee_details", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({
130
+ type: 'enum',
131
+ enum: AccommodationRequestStatus,
132
+ default: AccommodationRequestStatus.Pending,
133
+ nullable: false
134
+ }),
135
+ __metadata("design:type", String)
136
+ ], AccommodationRequest.prototype, "status", void 0);
137
+ __decorate([
138
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
139
+ __metadata("design:type", Object)
140
+ ], AccommodationRequest.prototype, "description", void 0);
141
+ __decorate([
142
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
143
+ __metadata("design:type", Object)
144
+ ], AccommodationRequest.prototype, "assigned_to_user_id", void 0);
145
+ __decorate([
146
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
147
+ __metadata("design:type", Object)
148
+ ], AccommodationRequest.prototype, "approver_comment", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
151
+ __metadata("design:type", Object)
152
+ ], AccommodationRequest.prototype, "approved_by", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
155
+ __metadata("design:type", Object)
156
+ ], AccommodationRequest.prototype, "approved_at", void 0);
157
+ exports.AccommodationRequest = AccommodationRequest = __decorate([
158
+ (0, typeorm_1.Entity)({ name: 'accommodation_requests' }),
159
+ __metadata("design:paramtypes", [])
160
+ ], AccommodationRequest);
@@ -0,0 +1,29 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum AccommodationWorkFlowStatus {
3
+ Pending = "Pending",
4
+ InProgress = "In Progress",
5
+ Approved = "Approved",
6
+ Rejected = "Rejected",
7
+ Completed = "Completed"
8
+ }
9
+ export declare class AccommodationWorkflow extends BaseModel {
10
+ request_id: number;
11
+ service_id: number;
12
+ sub_service_id: number;
13
+ workflow_definition_id: number;
14
+ current_level: number;
15
+ content: string;
16
+ status: AccommodationWorkFlowStatus;
17
+ step_order: number;
18
+ order: number;
19
+ user_id: number;
20
+ role_id: number;
21
+ approver_role_id: number;
22
+ approver_user_id: number;
23
+ approved_by: number;
24
+ department_id: number;
25
+ section_id: number;
26
+ workflow_data: string;
27
+ created_by: number;
28
+ constructor();
29
+ }
@@ -0,0 +1,109 @@
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.AccommodationWorkflow = exports.AccommodationWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var AccommodationWorkFlowStatus;
16
+ (function (AccommodationWorkFlowStatus) {
17
+ AccommodationWorkFlowStatus["Pending"] = "Pending";
18
+ AccommodationWorkFlowStatus["InProgress"] = "In Progress";
19
+ AccommodationWorkFlowStatus["Approved"] = "Approved";
20
+ AccommodationWorkFlowStatus["Rejected"] = "Rejected";
21
+ AccommodationWorkFlowStatus["Completed"] = "Completed";
22
+ })(AccommodationWorkFlowStatus || (exports.AccommodationWorkFlowStatus = AccommodationWorkFlowStatus = {}));
23
+ let AccommodationWorkflow = class AccommodationWorkflow extends BaseModel_1.BaseModel {
24
+ constructor() {
25
+ super();
26
+ }
27
+ };
28
+ exports.AccommodationWorkflow = AccommodationWorkflow;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], AccommodationWorkflow.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
35
+ __metadata("design:type", Number)
36
+ ], AccommodationWorkflow.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
39
+ __metadata("design:type", Number)
40
+ ], AccommodationWorkflow.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], AccommodationWorkflow.prototype, "workflow_definition_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
47
+ __metadata("design:type", Number)
48
+ ], AccommodationWorkflow.prototype, "current_level", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], AccommodationWorkflow.prototype, "content", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({
55
+ type: 'enum',
56
+ enum: AccommodationWorkFlowStatus,
57
+ default: AccommodationWorkFlowStatus.Pending,
58
+ nullable: false
59
+ }),
60
+ __metadata("design:type", String)
61
+ ], AccommodationWorkflow.prototype, "status", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
64
+ __metadata("design:type", Number)
65
+ ], AccommodationWorkflow.prototype, "step_order", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
68
+ __metadata("design:type", Number)
69
+ ], AccommodationWorkflow.prototype, "order", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
72
+ __metadata("design:type", Number)
73
+ ], AccommodationWorkflow.prototype, "user_id", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
76
+ __metadata("design:type", Number)
77
+ ], AccommodationWorkflow.prototype, "role_id", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
80
+ __metadata("design:type", Number)
81
+ ], AccommodationWorkflow.prototype, "approver_role_id", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
84
+ __metadata("design:type", Number)
85
+ ], AccommodationWorkflow.prototype, "approver_user_id", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
88
+ __metadata("design:type", Number)
89
+ ], AccommodationWorkflow.prototype, "approved_by", void 0);
90
+ __decorate([
91
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
92
+ __metadata("design:type", Number)
93
+ ], AccommodationWorkflow.prototype, "department_id", void 0);
94
+ __decorate([
95
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
96
+ __metadata("design:type", Number)
97
+ ], AccommodationWorkflow.prototype, "section_id", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
100
+ __metadata("design:type", String)
101
+ ], AccommodationWorkflow.prototype, "workflow_data", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
104
+ __metadata("design:type", Number)
105
+ ], AccommodationWorkflow.prototype, "created_by", void 0);
106
+ exports.AccommodationWorkflow = AccommodationWorkflow = __decorate([
107
+ (0, typeorm_1.Entity)({ name: 'accommodation_workflow' }),
108
+ __metadata("design:paramtypes", [])
109
+ ], AccommodationWorkflow);
@@ -8,9 +8,9 @@ export declare enum ShiftAllowanceRequestStatus {
8
8
  REJECTED = "Rejected"
9
9
  }
10
10
  export declare enum ShiftAllowanceValue {
11
- TWENTY_TWO_PERCENT = "22%",
12
- THIRTY_PERCENT = "30%",
13
- SEVENTY_PERCENT = "70%"
11
+ TWENTY_TWO_PERCENT = "22",
12
+ THIRTY_PERCENT = "30",
13
+ SEVENTY_PERCENT = "70"
14
14
  }
15
15
  export declare class ShiftAllowanceRequest extends BaseModel {
16
16
  req_user_department_id: number | null;
@@ -23,9 +23,9 @@ var ShiftAllowanceRequestStatus;
23
23
  })(ShiftAllowanceRequestStatus || (exports.ShiftAllowanceRequestStatus = ShiftAllowanceRequestStatus = {}));
24
24
  var ShiftAllowanceValue;
25
25
  (function (ShiftAllowanceValue) {
26
- ShiftAllowanceValue["TWENTY_TWO_PERCENT"] = "22%";
27
- ShiftAllowanceValue["THIRTY_PERCENT"] = "30%";
28
- ShiftAllowanceValue["SEVENTY_PERCENT"] = "70%";
26
+ ShiftAllowanceValue["TWENTY_TWO_PERCENT"] = "22";
27
+ ShiftAllowanceValue["THIRTY_PERCENT"] = "30";
28
+ ShiftAllowanceValue["SEVENTY_PERCENT"] = "70";
29
29
  })(ShiftAllowanceValue || (exports.ShiftAllowanceValue = ShiftAllowanceValue = {}));
30
30
  let ShiftAllowanceRequest = class ShiftAllowanceRequest extends BaseModel_1.BaseModel {
31
31
  constructor(user_id, status = ShiftAllowanceRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, employee_name, employee_id, job_title, financial_grade, allowance_value, shift_start_date, shift_end_date, start_time, end_time, reason_for_request) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.101",
3
+ "version": "2.3.102",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -128,17 +128,22 @@ import { RequestForCoverageWorkFlow } from './models/RequestForCoverageWorkflowM
128
128
  import { RequestForCoverageApprovalDetails } from './models/RequestForCoverageApprovalModel';
129
129
  import { RequestForCoverageRequestChat } from './models/RequestForCoverageChatModel';
130
130
  import { RequestForCoverageRequestAttachment } from './models/RequestForCoverageAttachmentModel';
131
- import { CashAllowanceLeaveRequest } from './models/CashAllowanceLeaveRequestModel';
132
- import { PromotionRequest } from './models/PromotionRequestModel';
133
- import { AnnualIncrementRequest } from './models/AnnualIncrementRequestModel';
134
- import { AnnualIncrementRequestEmployee } from './models/AnnualIncrementRequestEmployeeModel';
135
- import { SkillsEnhancementRequest } from './models/SkillsEnhancementRequestModel';
131
+ import { CashAllowanceLeaveRequest } from './models/CashAllowanceLeaveRequestModel';
132
+ import { PromotionRequest } from './models/PromotionRequestModel';
133
+ import { AnnualIncrementRequest } from './models/AnnualIncrementRequestModel';
134
+ import { AnnualIncrementRequestEmployee } from './models/AnnualIncrementRequestEmployeeModel';
135
+ import { SkillsEnhancementRequest } from './models/SkillsEnhancementRequestModel';
136
136
  import { CityMaster } from './models/CityMasterModel';
137
137
  import { ResidentialUnitRentalRequest } from './models/ResidentialUnitRentalRequestModel';
138
138
  import { ResidentialUnitRentalWorkflow } from './models/ResidentialUnitRentalWorkflowModel';
139
139
  import { ResidentialUnitRentalApproval } from './models/ResidentialUnitRentalApprovalModel';
140
140
  import { ResidentialUnitRentalChat } from './models/ResidentialUnitRentalChatModel';
141
141
  import { ResidentialUnitRentalAttachment } from './models/ResidentialUnitRentalAttachmentModel';
142
+ import { AccommodationRequest } from './models/AccommodationRequestModel';
143
+ import { AccommodationWorkflow } from './models/AccommodationWorkflowModel';
144
+ import { AccommodationApproval } from './models/AccommodationApprovalModel';
145
+ import { AccommodationChat } from './models/AccommodationChatModel';
146
+ import { AccommodationAttachment } from './models/AccommodationAttachmentModel';
142
147
 
143
148
  export const AppDataSource = new DataSource({
144
149
  type: 'postgres',
@@ -268,17 +273,22 @@ export const AppDataSource = new DataSource({
268
273
  AssignTasksEmpWorkFlow,
269
274
  AssignTasksEmpRequestAttachment,
270
275
  AssignTasksEmpRequestChat,
271
- CashAllowanceLeaveRequest,
272
- PromotionRequest,
273
- AnnualIncrementRequest,
274
- AnnualIncrementRequestEmployee,
275
- SkillsEnhancementRequest,
276
+ CashAllowanceLeaveRequest,
277
+ PromotionRequest,
278
+ AnnualIncrementRequest,
279
+ AnnualIncrementRequestEmployee,
280
+ SkillsEnhancementRequest,
276
281
  CityMaster,
277
282
  ResidentialUnitRentalRequest,
278
283
  ResidentialUnitRentalWorkflow,
279
284
  ResidentialUnitRentalApproval,
280
285
  ResidentialUnitRentalChat,
281
286
  ResidentialUnitRentalAttachment,
287
+ AccommodationRequest,
288
+ AccommodationWorkflow,
289
+ AccommodationApproval,
290
+ AccommodationChat,
291
+ AccommodationAttachment,
282
292
  Document,
283
293
  DocumentFolder,
284
294
  DocumentType,
package/src/index.ts CHANGED
@@ -240,12 +240,12 @@ export * from './models/AnnualIncrementRequestEmployeeModel';
240
240
  export * from './models/SkillsEnhancementRequestModel';
241
241
  export { SkillsEnhancementRequestStatus } from './models/SkillsEnhancementRequestModel';
242
242
 
243
- // Performance Management Service
244
- export * from './models/PerformanceManagementRequestModel';
245
- export { PerformanceManagementRequestStatus, PerformanceManagementCyclePeriod } from './models/PerformanceManagementRequestModel';
246
- export * from './models/PerformanceManagementRequestGoalModel';
247
- export * from './models/PerformanceCyclePeriodModel';
248
- export * from './models/PerformanceGoalMasterModel';
243
+ // Performance Management Service
244
+ export * from './models/PerformanceManagementRequestModel';
245
+ export { PerformanceManagementRequestStatus, PerformanceManagementCyclePeriod } from './models/PerformanceManagementRequestModel';
246
+ export * from './models/PerformanceManagementRequestGoalModel';
247
+ export * from './models/PerformanceCyclePeriodModel';
248
+ export * from './models/PerformanceGoalMasterModel';
249
249
 
250
250
  // Human Resource Annual Planning Service
251
251
  export * from './models/HumanResourceAnnualPlanningRequestModel';
@@ -268,6 +268,13 @@ export * from './models/ResidentialUnitRentalApprovalModel';
268
268
  export * from './models/ResidentialUnitRentalChatModel';
269
269
  export * from './models/ResidentialUnitRentalAttachmentModel';
270
270
 
271
+ // Accommodation Request Service (Request for Accommodation in Muscat Governorate)
272
+ export * from './models/AccommodationRequestModel';
273
+ export * from './models/AccommodationWorkflowModel';
274
+ export * from './models/AccommodationApprovalModel';
275
+ export * from './models/AccommodationChatModel';
276
+ export * from './models/AccommodationAttachmentModel';
277
+
271
278
  // Housing Contract Renewal (CAA042)
272
279
  export * from './models/HousingContractRenewalRequestModel';
273
280
  export * from './models/HousingContractRenewalWorkflowModel';
@@ -280,4 +287,4 @@ export * from './models/HousingContractCancelRequestModel';
280
287
  export * from './models/HousingContractCancelWorkflowModel';
281
288
  export * from './models/HousingContractCancelApprovalModel';
282
289
  export * from './models/HousingContractCancelChatModel';
283
- export * from './models/HousingContractCancelAttachmentModel';
290
+ export * from './models/HousingContractCancelAttachmentModel';
@@ -0,0 +1,61 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccommodationApprovalStatus {
5
+ PENDING = "Pending",
6
+ IN_PROGRESS = "In Progress",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ ASSIGNED = "Assigned"
10
+ }
11
+
12
+ @Entity({ name: 'accommodation_approvals' })
13
+ export class AccommodationApproval extends BaseModel {
14
+ @Column({ type: 'int', nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: 'int', nullable: false })
18
+ service_id: number;
19
+
20
+ @Column({ type: 'int', nullable: false })
21
+ sub_service_id: number;
22
+
23
+ @Column({ type: 'int', nullable: true })
24
+ approver_role_id: number;
25
+
26
+ @Column({ type: 'int', nullable: true })
27
+ approver_user_id: number;
28
+
29
+ @Column({ type: 'int', nullable: true })
30
+ delegate_user_id: number;
31
+
32
+ @Column({ type: 'int', nullable: true })
33
+ approved_by: number;
34
+
35
+ @Column({ type: 'int', nullable: true })
36
+ department_id: number;
37
+
38
+ @Column({ type: 'int', nullable: true })
39
+ section_id: number;
40
+
41
+ @Column({ type: 'int', nullable: false })
42
+ level: number;
43
+
44
+ @Column({
45
+ type: 'enum',
46
+ enum: AccommodationApprovalStatus,
47
+ default: AccommodationApprovalStatus.PENDING,
48
+ nullable: false
49
+ })
50
+ approval_status: AccommodationApprovalStatus;
51
+
52
+ @Column({ type: 'text', nullable: true })
53
+ comment: string;
54
+
55
+ @Column({ type: 'int', nullable: false })
56
+ created_by: number;
57
+
58
+ constructor() {
59
+ super();
60
+ }
61
+ }
@@ -0,0 +1,45 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: 'accommodation_attachments' })
5
+ export class AccommodationAttachment extends BaseModel {
6
+ @Column({ type: 'int', nullable: false })
7
+ request_id: number;
8
+
9
+ @Column({ type: 'int', nullable: false })
10
+ service_id: number;
11
+
12
+ @Column({ type: 'int', nullable: false })
13
+ sub_service_id: number;
14
+
15
+ @Column({ type: 'varchar', length: 255, nullable: false })
16
+ file_name: string;
17
+
18
+ @Column({ type: 'varchar', length: 500, nullable: false })
19
+ file_url: string;
20
+
21
+ @Column({ type: 'varchar', length: 50, nullable: false })
22
+ file_type: string;
23
+
24
+ @Column({ type: 'int', nullable: false })
25
+ file_size: number;
26
+
27
+ @Column({ type: 'varchar', length: 100, nullable: true })
28
+ mime_type: string;
29
+
30
+ @Column({ type: 'varchar', length: 500, nullable: true })
31
+ file_path: string;
32
+
33
+ @Column({ type: 'text', nullable: true })
34
+ description: string;
35
+
36
+ @Column({ type: 'int', nullable: false })
37
+ uploaded_by: number;
38
+
39
+ @Column({ type: 'int', nullable: false })
40
+ created_by: number;
41
+
42
+ constructor() {
43
+ super();
44
+ }
45
+ }
@@ -0,0 +1,47 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccommodationMessageType {
5
+ text = 'text',
6
+ image = 'image',
7
+ video = 'video',
8
+ file = 'file',
9
+ link = 'link'
10
+ }
11
+
12
+ @Entity({ name: 'accommodation_chat' })
13
+ export class AccommodationChat extends BaseModel {
14
+ @Column({ type: 'int', nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: 'int', nullable: false })
18
+ service_id: number;
19
+
20
+ @Column({ type: 'int', nullable: false })
21
+ sub_service_id: number;
22
+
23
+ @Column({ type: 'int', nullable: false })
24
+ user_id: number;
25
+
26
+ @Column({ type: 'text', nullable: false })
27
+ message: string;
28
+
29
+ @Column({ type: 'varchar', length: 20, nullable: false })
30
+ message_type: string; // text, image, video, file, link
31
+
32
+ @Column({ type: 'boolean', nullable: false, default: false })
33
+ is_internal: boolean;
34
+
35
+ @Column({ type: 'int', nullable: true })
36
+ approver_role_id: number;
37
+
38
+ @Column({ type: 'varchar', length: 50, nullable: true })
39
+ status: string; // Submitted, Pending, Approved, Rejected
40
+
41
+ @Column({ type: 'int', nullable: false })
42
+ created_by: number;
43
+
44
+ constructor() {
45
+ super();
46
+ }
47
+ }
@@ -0,0 +1,140 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccommodationRequestStatus {
5
+ Pending = 'Pending',
6
+ Approved = 'Approved',
7
+ Rejected = 'Rejected',
8
+ InProgress = 'In Progress',
9
+ Assigned = 'Assigned',
10
+ Completed = 'Completed'
11
+ }
12
+
13
+ export enum OfficialPurposeOfTravel {
14
+ Workshop = 'Workshop',
15
+ Training = 'Training',
16
+ DutyMission = 'Duty Mission',
17
+ Assignment = 'Assignment',
18
+ Other = 'Other'
19
+ }
20
+
21
+ export enum AccommodationType {
22
+ Apartment = 'Apartment',
23
+ Villa = 'Villa',
24
+ SharedUnit = 'Shared Unit'
25
+ }
26
+
27
+ @Entity({ name: 'accommodation_requests' })
28
+ export class AccommodationRequest extends BaseModel {
29
+ // Request ID - Auto generated
30
+ @Column({ type: 'varchar', length: 100, nullable: true })
31
+ reference_number: string | null;
32
+
33
+ // Workflow fields
34
+ @Column({ type: 'int', nullable: true })
35
+ req_user_department_id: number | null;
36
+
37
+ @Column({ type: 'int', nullable: true })
38
+ req_user_section_id: number | null;
39
+
40
+ @Column({ type: 'int', nullable: false })
41
+ service_id: number;
42
+
43
+ @Column({ type: 'int', nullable: false })
44
+ sub_service_id: number;
45
+
46
+ @Column({ type: 'varchar', length: 255, nullable: true })
47
+ workflow_execution_id: string | null;
48
+
49
+ // User fields
50
+ @Column({ type: 'int', nullable: false })
51
+ user_id: number;
52
+
53
+ @Column({ type: 'int', nullable: false })
54
+ created_by: number;
55
+
56
+ // 2. Official Purpose of Travel (Workshop / Training / Duty Mission / Assignment / Other – specify)
57
+ @Column({
58
+ type: 'enum',
59
+ enum: OfficialPurposeOfTravel,
60
+ nullable: false
61
+ })
62
+ official_purpose_of_travel: OfficialPurposeOfTravel;
63
+
64
+ @Column({ type: 'varchar', length: 255, nullable: true })
65
+ other_purpose_specification: string | null; // If Other is selected
66
+
67
+ // 3. Accommodation Type Requested (Apartment / Villa / Shared Unit)
68
+ @Column({
69
+ type: 'enum',
70
+ enum: AccommodationType,
71
+ nullable: false
72
+ })
73
+ accommodation_type_requested: AccommodationType;
74
+
75
+ // 4. Start Date of Stay (M)
76
+ @Column({ type: 'date', nullable: false })
77
+ start_date_of_stay: Date;
78
+
79
+ // 5. Duration of Days (M)
80
+ @Column({ type: 'int', nullable: false })
81
+ duration_of_days: number;
82
+
83
+ // 6. Travel Details (From – To)
84
+ @Column({ type: 'varchar', length: 255, nullable: false })
85
+ travel_from: string;
86
+
87
+ @Column({ type: 'varchar', length: 255, nullable: false })
88
+ travel_to: string;
89
+
90
+ // 7. Time of arrival (M)
91
+ @Column({ type: 'time', nullable: false })
92
+ time_of_arrival: string; // Format: HH:MM
93
+
94
+ // 8. Travelling from which region (M)
95
+ @Column({ type: 'varchar', length: 255, nullable: false })
96
+ travelling_from_region: string;
97
+
98
+ // 9. No. of employees travelling (M)
99
+ @Column({ type: 'int', nullable: false })
100
+ number_of_employees_travelling: number;
101
+
102
+ // 10. Details of employee Emp id / Name / Designation/ Grade/ Contact Number
103
+ @Column({ type: 'json', nullable: false })
104
+ employee_details: Array<{
105
+ employee_id: string;
106
+ employee_name: string;
107
+ designation: string;
108
+ grade: string;
109
+ contact_number: string;
110
+ }>;
111
+
112
+ // Status
113
+ @Column({
114
+ type: 'enum',
115
+ enum: AccommodationRequestStatus,
116
+ default: AccommodationRequestStatus.Pending,
117
+ nullable: false
118
+ })
119
+ status: AccommodationRequestStatus;
120
+
121
+ // Additional fields
122
+ @Column({ type: 'text', nullable: true })
123
+ description: string | null;
124
+
125
+ @Column({ type: 'int', nullable: true })
126
+ assigned_to_user_id: number | null;
127
+
128
+ @Column({ type: 'text', nullable: true })
129
+ approver_comment: string | null;
130
+
131
+ @Column({ type: 'int', nullable: true })
132
+ approved_by: number | null;
133
+
134
+ @Column({ type: 'date', nullable: true })
135
+ approved_at: Date | null;
136
+
137
+ constructor() {
138
+ super();
139
+ }
140
+ }
@@ -0,0 +1,76 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum AccommodationWorkFlowStatus {
5
+ Pending = 'Pending',
6
+ InProgress = 'In Progress',
7
+ Approved = 'Approved',
8
+ Rejected = 'Rejected',
9
+ Completed = 'Completed'
10
+ }
11
+
12
+ @Entity({ name: 'accommodation_workflow' })
13
+ export class AccommodationWorkflow extends BaseModel {
14
+ @Column({ type: 'int', nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: 'int', nullable: true })
18
+ service_id: number;
19
+
20
+ @Column({ type: 'int', nullable: true })
21
+ sub_service_id: number;
22
+
23
+ @Column({ type: 'int', nullable: true })
24
+ workflow_definition_id: number;
25
+
26
+ @Column({ type: 'int', nullable: true })
27
+ current_level: number;
28
+
29
+ @Column({ type: 'varchar', length: 500, nullable: true })
30
+ content: string;
31
+
32
+ @Column({
33
+ type: 'enum',
34
+ enum: AccommodationWorkFlowStatus,
35
+ default: AccommodationWorkFlowStatus.Pending,
36
+ nullable: false
37
+ })
38
+ status: AccommodationWorkFlowStatus;
39
+
40
+ @Column({ type: 'int', nullable: true })
41
+ step_order: number;
42
+
43
+ @Column({ type: 'int', nullable: true })
44
+ order: number;
45
+
46
+ @Column({ type: 'int', nullable: true })
47
+ user_id: number;
48
+
49
+ @Column({ type: 'int', nullable: true })
50
+ role_id: number;
51
+
52
+ @Column({ type: 'int', nullable: true })
53
+ approver_role_id: number;
54
+
55
+ @Column({ type: 'int', nullable: true })
56
+ approver_user_id: number;
57
+
58
+ @Column({ type: 'int', nullable: true })
59
+ approved_by: number;
60
+
61
+ @Column({ type: 'int', nullable: true })
62
+ department_id: number;
63
+
64
+ @Column({ type: 'int', nullable: true })
65
+ section_id: number;
66
+
67
+ @Column({ type: 'text', nullable: true })
68
+ workflow_data: string; // JSON string
69
+
70
+ @Column({ type: 'int', nullable: false })
71
+ created_by: number;
72
+
73
+ constructor() {
74
+ super();
75
+ }
76
+ }
@@ -11,9 +11,9 @@ export enum ShiftAllowanceRequestStatus {
11
11
  }
12
12
 
13
13
  export enum ShiftAllowanceValue {
14
- TWENTY_TWO_PERCENT = "22%",
15
- THIRTY_PERCENT = "30%",
16
- SEVENTY_PERCENT = "70%"
14
+ TWENTY_TWO_PERCENT = "22",
15
+ THIRTY_PERCENT = "30",
16
+ SEVENTY_PERCENT = "70"
17
17
  }
18
18
 
19
19
  @Entity({ name: "shift_allowance_requests" })