@platform-modules/civil-aviation-authority 2.3.223 → 2.3.224

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.
@@ -146,6 +146,12 @@ const MultiPurposeHallWorkflowModel_1 = require("./models/MultiPurposeHallWorkfl
146
146
  const MultiPurposeHallChatModel_1 = require("./models/MultiPurposeHallChatModel");
147
147
  const MultiPurposeHallAttachmentModel_1 = require("./models/MultiPurposeHallAttachmentModel");
148
148
  const MultiPurposeHallHistoryModel_1 = require("./models/MultiPurposeHallHistoryModel");
149
+ const FoodRequestModel_1 = require("./models/FoodRequestModel");
150
+ const FoodApprovalModel_1 = require("./models/FoodApprovalModel");
151
+ const FoodWorkflowModel_1 = require("./models/FoodWorkflowModel");
152
+ const FoodChatModel_1 = require("./models/FoodChatModel");
153
+ const FoodAttachmentModel_1 = require("./models/FoodAttachmentModel");
154
+ const FoodHistoryModel_1 = require("./models/FoodHistoryModel");
149
155
  const AnnualTrainingPlanRequestModel_1 = require("./models/AnnualTrainingPlanRequestModel");
150
156
  const AnnualTrainingPlanWorkflowModel_1 = require("./models/AnnualTrainingPlanWorkflowModel");
151
157
  const AnnualTrainingPlanApprovalModel_1 = require("./models/AnnualTrainingPlanApprovalModel");
@@ -361,6 +367,12 @@ exports.AppDataSource = new typeorm_1.DataSource({
361
367
  MultiPurposeHallChatModel_1.MultiPurposeHallRequestChat,
362
368
  MultiPurposeHallAttachmentModel_1.MultiPurposeHallRequestAttachment,
363
369
  MultiPurposeHallHistoryModel_1.MultiPurposeHallHistory,
370
+ FoodRequestModel_1.FoodRequests,
371
+ FoodApprovalModel_1.FoodApprovalDetails,
372
+ FoodWorkflowModel_1.FoodWorkFlow,
373
+ FoodChatModel_1.FoodRequestChat,
374
+ FoodAttachmentModel_1.FoodRequestAttachment,
375
+ FoodHistoryModel_1.FoodHistory,
364
376
  AnnualTrainingPlanRequestModel_1.AnnualTrainingPlanRequest,
365
377
  AnnualTrainingPlanWorkflowModel_1.AnnualTrainingPlanWorkFlow,
366
378
  AnnualTrainingPlanApprovalModel_1.AnnualTrainingPlanApprovalDetails,
package/dist/index.d.ts CHANGED
@@ -118,6 +118,12 @@ export * from './models/MultiPurposeHallWorkflowModel';
118
118
  export * from './models/MultiPurposeHallChatModel';
119
119
  export * from './models/MultiPurposeHallAttachmentModel';
120
120
  export * from './models/MultiPurposeHallHistoryModel';
121
+ export * from './models/FoodRequestModel';
122
+ export * from './models/FoodApprovalModel';
123
+ export * from './models/FoodWorkflowModel';
124
+ export * from './models/FoodChatModel';
125
+ export * from './models/FoodAttachmentModel';
126
+ export * from './models/FoodHistoryModel';
121
127
  export { CancellationRequestStatus } from './models/CancellationRequestModel';
122
128
  export { EventSupportRequestStatus } from './models/EventSupportRequestModel';
123
129
  export { EventSupportApprovalStatus } from './models/EventSupportApprovalModel';
package/dist/index.js CHANGED
@@ -146,6 +146,12 @@ __exportStar(require("./models/MultiPurposeHallWorkflowModel"), exports);
146
146
  __exportStar(require("./models/MultiPurposeHallChatModel"), exports);
147
147
  __exportStar(require("./models/MultiPurposeHallAttachmentModel"), exports);
148
148
  __exportStar(require("./models/MultiPurposeHallHistoryModel"), exports);
149
+ __exportStar(require("./models/FoodRequestModel"), exports);
150
+ __exportStar(require("./models/FoodApprovalModel"), exports);
151
+ __exportStar(require("./models/FoodWorkflowModel"), exports);
152
+ __exportStar(require("./models/FoodChatModel"), exports);
153
+ __exportStar(require("./models/FoodAttachmentModel"), exports);
154
+ __exportStar(require("./models/FoodHistoryModel"), exports);
149
155
  var CancellationRequestModel_1 = require("./models/CancellationRequestModel");
150
156
  Object.defineProperty(exports, "CancellationRequestStatus", { enumerable: true, get: function () { return CancellationRequestModel_1.CancellationRequestStatus; } });
151
157
  var EventSupportRequestModel_1 = require("./models/EventSupportRequestModel");
@@ -0,0 +1,22 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum FoodApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class FoodApprovalDetails 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 | null;
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: FoodApprovalStatus;
21
+ is_allowed: boolean;
22
+ }
@@ -0,0 +1,84 @@
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.FoodApprovalDetails = exports.FoodApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var FoodApprovalStatus;
16
+ (function (FoodApprovalStatus) {
17
+ FoodApprovalStatus["PENDING"] = "Pending";
18
+ FoodApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ FoodApprovalStatus["APPROVED"] = "Approved";
20
+ FoodApprovalStatus["REJECTED"] = "Rejected";
21
+ })(FoodApprovalStatus || (exports.FoodApprovalStatus = FoodApprovalStatus = {}));
22
+ let FoodApprovalDetails = class FoodApprovalDetails extends BaseModel_1.BaseModel {
23
+ };
24
+ exports.FoodApprovalDetails = FoodApprovalDetails;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], FoodApprovalDetails.prototype, "request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
31
+ __metadata("design:type", Object)
32
+ ], FoodApprovalDetails.prototype, "service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], FoodApprovalDetails.prototype, "sub_service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], FoodApprovalDetails.prototype, "level", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], FoodApprovalDetails.prototype, "approver_role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], FoodApprovalDetails.prototype, "department_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], FoodApprovalDetails.prototype, "section_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], FoodApprovalDetails.prototype, "approver_user_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], FoodApprovalDetails.prototype, "delegate_user_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], FoodApprovalDetails.prototype, "approved_by", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true, default: "" }),
67
+ __metadata("design:type", String)
68
+ ], FoodApprovalDetails.prototype, "comment", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: "enum",
72
+ enum: FoodApprovalStatus,
73
+ default: FoodApprovalStatus.PENDING,
74
+ nullable: false,
75
+ }),
76
+ __metadata("design:type", String)
77
+ ], FoodApprovalDetails.prototype, "approval_status", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: "boolean", default: true, nullable: false }),
80
+ __metadata("design:type", Boolean)
81
+ ], FoodApprovalDetails.prototype, "is_allowed", void 0);
82
+ exports.FoodApprovalDetails = FoodApprovalDetails = __decorate([
83
+ (0, typeorm_1.Entity)({ name: "food_approvals" })
84
+ ], FoodApprovalDetails);
@@ -0,0 +1,11 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare class FoodRequestAttachment extends BaseModel {
3
+ request_id: number;
4
+ service_id: number | null;
5
+ sub_service_id: number | null;
6
+ file_url: string;
7
+ file_name: string;
8
+ file_type: string;
9
+ file_size: number | null;
10
+ chat_id: number | null;
11
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FoodRequestAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let FoodRequestAttachment = class FoodRequestAttachment extends BaseModel_1.BaseModel {
16
+ };
17
+ exports.FoodRequestAttachment = FoodRequestAttachment;
18
+ __decorate([
19
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
20
+ __metadata("design:type", Number)
21
+ ], FoodRequestAttachment.prototype, "request_id", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
24
+ __metadata("design:type", Object)
25
+ ], FoodRequestAttachment.prototype, "service_id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
28
+ __metadata("design:type", Object)
29
+ ], FoodRequestAttachment.prototype, "sub_service_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], FoodRequestAttachment.prototype, "file_url", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
36
+ __metadata("design:type", String)
37
+ ], FoodRequestAttachment.prototype, "file_name", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], FoodRequestAttachment.prototype, "file_type", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: "bigint", nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], FoodRequestAttachment.prototype, "file_size", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], FoodRequestAttachment.prototype, "chat_id", void 0);
50
+ exports.FoodRequestAttachment = FoodRequestAttachment = __decorate([
51
+ (0, typeorm_1.Entity)({ name: "food_attachments" })
52
+ ], FoodRequestAttachment);
@@ -0,0 +1,18 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum FoodMessageType {
3
+ TEXT = "text",
4
+ IMAGE = "image",
5
+ VIDEO = "video",
6
+ FILE = "file",
7
+ LINK = "link"
8
+ }
9
+ export declare class FoodRequestChat extends BaseModel {
10
+ request_id: number;
11
+ service_id: number | null;
12
+ sub_service_id: number | null;
13
+ user_id: number;
14
+ role_id: number | null;
15
+ message: string;
16
+ messageType: FoodMessageType;
17
+ status: string | null;
18
+ }
@@ -0,0 +1,65 @@
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.FoodRequestChat = exports.FoodMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var FoodMessageType;
16
+ (function (FoodMessageType) {
17
+ FoodMessageType["TEXT"] = "text";
18
+ FoodMessageType["IMAGE"] = "image";
19
+ FoodMessageType["VIDEO"] = "video";
20
+ FoodMessageType["FILE"] = "file";
21
+ FoodMessageType["LINK"] = "link";
22
+ })(FoodMessageType || (exports.FoodMessageType = FoodMessageType = {}));
23
+ let FoodRequestChat = class FoodRequestChat extends BaseModel_1.BaseModel {
24
+ };
25
+ exports.FoodRequestChat = FoodRequestChat;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], FoodRequestChat.prototype, "request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], FoodRequestChat.prototype, "service_id", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
36
+ __metadata("design:type", Object)
37
+ ], FoodRequestChat.prototype, "sub_service_id", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], FoodRequestChat.prototype, "user_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], FoodRequestChat.prototype, "role_id", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: "text", nullable: false }),
48
+ __metadata("design:type", String)
49
+ ], FoodRequestChat.prototype, "message", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({
52
+ type: "enum",
53
+ enum: FoodMessageType,
54
+ default: FoodMessageType.TEXT,
55
+ nullable: false,
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], FoodRequestChat.prototype, "messageType", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
61
+ __metadata("design:type", Object)
62
+ ], FoodRequestChat.prototype, "status", void 0);
63
+ exports.FoodRequestChat = FoodRequestChat = __decorate([
64
+ (0, typeorm_1.Entity)({ name: "food_chats" })
65
+ ], FoodRequestChat);
@@ -0,0 +1,15 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ import { FoodMealTypeEnum, FoodRequestTypeEnum } from "./FoodRequestModel";
3
+ export declare class FoodHistory extends BaseModel {
4
+ /** Source `food_requests.id` when history was created on final approval. */
5
+ request_id: number | null;
6
+ request_type: FoodRequestTypeEnum | null;
7
+ event_date: string | null;
8
+ event_start_time: string | null;
9
+ event_end_time: string | null;
10
+ hall_id: number | null;
11
+ hall_type: string | null;
12
+ number_of_guests: number | null;
13
+ meal_type: FoodMealTypeEnum | null;
14
+ department_id: number | null;
15
+ }
@@ -0,0 +1,71 @@
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.FoodHistory = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const FoodRequestModel_1 = require("./FoodRequestModel");
16
+ let FoodHistory = class FoodHistory extends BaseModel_1.BaseModel {
17
+ };
18
+ exports.FoodHistory = FoodHistory;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
21
+ __metadata("design:type", Object)
22
+ ], FoodHistory.prototype, "request_id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({
25
+ type: "enum",
26
+ enum: FoodRequestModel_1.FoodRequestTypeEnum,
27
+ enumName: "food_request_type_en",
28
+ nullable: true,
29
+ }),
30
+ __metadata("design:type", Object)
31
+ ], FoodHistory.prototype, "request_type", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], FoodHistory.prototype, "event_date", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], FoodHistory.prototype, "event_start_time", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], FoodHistory.prototype, "event_end_time", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], FoodHistory.prototype, "hall_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], FoodHistory.prototype, "hall_type", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], FoodHistory.prototype, "number_of_guests", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({
58
+ type: "enum",
59
+ enum: FoodRequestModel_1.FoodMealTypeEnum,
60
+ enumName: "food_meal_type_en",
61
+ nullable: true,
62
+ }),
63
+ __metadata("design:type", Object)
64
+ ], FoodHistory.prototype, "meal_type", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], FoodHistory.prototype, "department_id", void 0);
69
+ exports.FoodHistory = FoodHistory = __decorate([
70
+ (0, typeorm_1.Entity)({ name: "food_histories" })
71
+ ], FoodHistory);
@@ -0,0 +1,34 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum FoodRequestStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected",
7
+ CANCELLED = "Cancelled"
8
+ }
9
+ export declare enum FoodRequestTypeEnum {
10
+ INTERNAL = "Internal",
11
+ EXTERNAL = "External"
12
+ }
13
+ export declare enum FoodMealTypeEnum {
14
+ BREAKFAST = "Breakfast",
15
+ LUNCH = "Lunch",
16
+ DINNER = "Dinner"
17
+ }
18
+ export declare class FoodRequests extends BaseModel {
19
+ req_user_department_id: number | null;
20
+ req_user_section_id: number | null;
21
+ service_id: number | null;
22
+ sub_service_id: number | null;
23
+ user_id: number;
24
+ request_type: FoodRequestTypeEnum;
25
+ event_date: string;
26
+ event_start_time: string;
27
+ event_end_time: string;
28
+ hall_id: number | null;
29
+ hall_type: string | null;
30
+ number_of_guests: number | null;
31
+ meal_type: FoodMealTypeEnum | null;
32
+ status: FoodRequestStatus;
33
+ workflow_execution_id: string | null;
34
+ }
@@ -0,0 +1,114 @@
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.FoodRequests = exports.FoodMealTypeEnum = exports.FoodRequestTypeEnum = exports.FoodRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var FoodRequestStatus;
16
+ (function (FoodRequestStatus) {
17
+ FoodRequestStatus["PENDING"] = "Pending";
18
+ FoodRequestStatus["IN_PROGRESS"] = "In Progress";
19
+ FoodRequestStatus["APPROVED"] = "Approved";
20
+ FoodRequestStatus["REJECTED"] = "Rejected";
21
+ FoodRequestStatus["CANCELLED"] = "Cancelled";
22
+ })(FoodRequestStatus || (exports.FoodRequestStatus = FoodRequestStatus = {}));
23
+ var FoodRequestTypeEnum;
24
+ (function (FoodRequestTypeEnum) {
25
+ FoodRequestTypeEnum["INTERNAL"] = "Internal";
26
+ FoodRequestTypeEnum["EXTERNAL"] = "External";
27
+ })(FoodRequestTypeEnum || (exports.FoodRequestTypeEnum = FoodRequestTypeEnum = {}));
28
+ var FoodMealTypeEnum;
29
+ (function (FoodMealTypeEnum) {
30
+ FoodMealTypeEnum["BREAKFAST"] = "Breakfast";
31
+ FoodMealTypeEnum["LUNCH"] = "Lunch";
32
+ FoodMealTypeEnum["DINNER"] = "Dinner";
33
+ })(FoodMealTypeEnum || (exports.FoodMealTypeEnum = FoodMealTypeEnum = {}));
34
+ let FoodRequests = class FoodRequests extends BaseModel_1.BaseModel {
35
+ };
36
+ exports.FoodRequests = FoodRequests;
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], FoodRequests.prototype, "req_user_department_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], FoodRequests.prototype, "req_user_section_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], FoodRequests.prototype, "service_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], FoodRequests.prototype, "sub_service_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
55
+ __metadata("design:type", Number)
56
+ ], FoodRequests.prototype, "user_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({
59
+ type: "enum",
60
+ enum: FoodRequestTypeEnum,
61
+ enumName: "food_request_type_en",
62
+ nullable: false,
63
+ }),
64
+ __metadata("design:type", String)
65
+ ], FoodRequests.prototype, "request_type", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
68
+ __metadata("design:type", String)
69
+ ], FoodRequests.prototype, "event_date", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)({ type: "time", nullable: false }),
72
+ __metadata("design:type", String)
73
+ ], FoodRequests.prototype, "event_start_time", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({ type: "time", nullable: false }),
76
+ __metadata("design:type", String)
77
+ ], FoodRequests.prototype, "event_end_time", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
80
+ __metadata("design:type", Object)
81
+ ], FoodRequests.prototype, "hall_id", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
84
+ __metadata("design:type", Object)
85
+ ], FoodRequests.prototype, "hall_type", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
88
+ __metadata("design:type", Object)
89
+ ], FoodRequests.prototype, "number_of_guests", void 0);
90
+ __decorate([
91
+ (0, typeorm_1.Column)({
92
+ type: "enum",
93
+ enum: FoodMealTypeEnum,
94
+ enumName: "food_meal_type_en",
95
+ nullable: true,
96
+ }),
97
+ __metadata("design:type", Object)
98
+ ], FoodRequests.prototype, "meal_type", void 0);
99
+ __decorate([
100
+ (0, typeorm_1.Column)({
101
+ type: "enum",
102
+ enum: FoodRequestStatus,
103
+ default: FoodRequestStatus.PENDING,
104
+ nullable: false,
105
+ }),
106
+ __metadata("design:type", String)
107
+ ], FoodRequests.prototype, "status", void 0);
108
+ __decorate([
109
+ (0, typeorm_1.Column)({ type: "varchar", nullable: true }),
110
+ __metadata("design:type", Object)
111
+ ], FoodRequests.prototype, "workflow_execution_id", void 0);
112
+ exports.FoodRequests = FoodRequests = __decorate([
113
+ (0, typeorm_1.Entity)({ name: "food_requests" })
114
+ ], FoodRequests);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum FoodWorkFlowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class FoodWorkFlow extends BaseModel {
8
+ request_id: number;
9
+ service_id: number | null;
10
+ sub_service_id: number | null;
11
+ content: string;
12
+ status: FoodWorkFlowStatus;
13
+ user_id: number | null;
14
+ role_id: number | null;
15
+ department_id: number | null;
16
+ section_id: number | null;
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.FoodWorkFlow = exports.FoodWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var FoodWorkFlowStatus;
16
+ (function (FoodWorkFlowStatus) {
17
+ FoodWorkFlowStatus["COMPLETED"] = "Completed";
18
+ FoodWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ FoodWorkFlowStatus["PENDING"] = "Pending";
20
+ })(FoodWorkFlowStatus || (exports.FoodWorkFlowStatus = FoodWorkFlowStatus = {}));
21
+ let FoodWorkFlow = class FoodWorkFlow extends BaseModel_1.BaseModel {
22
+ };
23
+ exports.FoodWorkFlow = FoodWorkFlow;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
26
+ __metadata("design:type", Number)
27
+ ], FoodWorkFlow.prototype, "request_id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], FoodWorkFlow.prototype, "service_id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], FoodWorkFlow.prototype, "sub_service_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], FoodWorkFlow.prototype, "content", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({
42
+ type: "enum",
43
+ enum: FoodWorkFlowStatus,
44
+ default: FoodWorkFlowStatus.NOT_YET_STARTED,
45
+ nullable: false,
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], FoodWorkFlow.prototype, "status", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], FoodWorkFlow.prototype, "user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], FoodWorkFlow.prototype, "role_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], FoodWorkFlow.prototype, "department_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], FoodWorkFlow.prototype, "section_id", void 0);
65
+ exports.FoodWorkFlow = FoodWorkFlow = __decorate([
66
+ (0, typeorm_1.Entity)({ name: "food_workflows" })
67
+ ], FoodWorkFlow);
@@ -1,5 +1,7 @@
1
1
  import { BaseModel } from "./BaseModel";
2
2
  export declare class MultiPurposeHallHistory extends BaseModel {
3
+ /** Source `multi_purpose_hall_requests.id` when history was created on final approval. */
4
+ request_id: number | null;
3
5
  hall_id: number | null;
4
6
  location_id: number | null;
5
7
  department_id: number | null;
@@ -15,6 +15,10 @@ const BaseModel_1 = require("./BaseModel");
15
15
  let MultiPurposeHallHistory = class MultiPurposeHallHistory extends BaseModel_1.BaseModel {
16
16
  };
17
17
  exports.MultiPurposeHallHistory = MultiPurposeHallHistory;
18
+ __decorate([
19
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
20
+ __metadata("design:type", Object)
21
+ ], MultiPurposeHallHistory.prototype, "request_id", void 0);
18
22
  __decorate([
19
23
  (0, typeorm_1.Column)({ type: "int", nullable: true }),
20
24
  __metadata("design:type", Object)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.223",
3
+ "version": "2.3.224",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -144,6 +144,12 @@ import { MultiPurposeHallWorkFlow } from './models/MultiPurposeHallWorkflowModel
144
144
  import { MultiPurposeHallRequestChat } from './models/MultiPurposeHallChatModel';
145
145
  import { MultiPurposeHallRequestAttachment } from './models/MultiPurposeHallAttachmentModel';
146
146
  import { MultiPurposeHallHistory } from './models/MultiPurposeHallHistoryModel';
147
+ import { FoodRequests } from './models/FoodRequestModel';
148
+ import { FoodApprovalDetails } from './models/FoodApprovalModel';
149
+ import { FoodWorkFlow } from './models/FoodWorkflowModel';
150
+ import { FoodRequestChat } from './models/FoodChatModel';
151
+ import { FoodRequestAttachment } from './models/FoodAttachmentModel';
152
+ import { FoodHistory } from './models/FoodHistoryModel';
147
153
  import { AnnualTrainingPlanRequest } from './models/AnnualTrainingPlanRequestModel';
148
154
  import { AnnualTrainingPlanWorkFlow } from './models/AnnualTrainingPlanWorkflowModel';
149
155
  import { AnnualTrainingPlanApprovalDetails } from './models/AnnualTrainingPlanApprovalModel';
@@ -360,6 +366,12 @@ export const AppDataSource = new DataSource({
360
366
  MultiPurposeHallRequestChat,
361
367
  MultiPurposeHallRequestAttachment,
362
368
  MultiPurposeHallHistory,
369
+ FoodRequests,
370
+ FoodApprovalDetails,
371
+ FoodWorkFlow,
372
+ FoodRequestChat,
373
+ FoodRequestAttachment,
374
+ FoodHistory,
363
375
  AnnualTrainingPlanRequest,
364
376
  AnnualTrainingPlanWorkFlow,
365
377
  AnnualTrainingPlanApprovalDetails,
package/src/index.ts CHANGED
@@ -124,6 +124,12 @@ export * from './models/MultiPurposeHallWorkflowModel';
124
124
  export * from './models/MultiPurposeHallChatModel';
125
125
  export * from './models/MultiPurposeHallAttachmentModel';
126
126
  export * from './models/MultiPurposeHallHistoryModel';
127
+ export * from './models/FoodRequestModel';
128
+ export * from './models/FoodApprovalModel';
129
+ export * from './models/FoodWorkflowModel';
130
+ export * from './models/FoodChatModel';
131
+ export * from './models/FoodAttachmentModel';
132
+ export * from './models/FoodHistoryModel';
127
133
  export { CancellationRequestStatus } from './models/CancellationRequestModel';
128
134
  export { EventSupportRequestStatus } from './models/EventSupportRequestModel';
129
135
  export { EventSupportApprovalStatus } from './models/EventSupportApprovalModel';
@@ -0,0 +1,56 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum FoodApprovalStatus {
5
+ PENDING = "Pending",
6
+ IN_PROGRESS = "In Progress",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ }
10
+
11
+ @Entity({ name: "food_approvals" })
12
+ export class FoodApprovalDetails extends BaseModel {
13
+ @Column({ type: "integer", nullable: false })
14
+ request_id: number;
15
+
16
+ @Column({ type: "integer", nullable: true })
17
+ service_id: number | null;
18
+
19
+ @Column({ type: "integer", nullable: true })
20
+ sub_service_id: number | null;
21
+
22
+ @Column({ type: "integer", nullable: false })
23
+ level: number;
24
+
25
+ @Column({ type: "integer", nullable: true })
26
+ approver_role_id: number | null;
27
+
28
+ @Column({ type: "integer", nullable: true })
29
+ department_id: number | null;
30
+
31
+ @Column({ type: "integer", nullable: true })
32
+ section_id: number | null;
33
+
34
+ @Column({ type: "integer", nullable: true })
35
+ approver_user_id: number | null;
36
+
37
+ @Column({ type: "integer", nullable: true })
38
+ delegate_user_id: number | null;
39
+
40
+ @Column({ type: "integer", nullable: true })
41
+ approved_by: number | null;
42
+
43
+ @Column({ type: "varchar", length: 500, nullable: true, default: "" })
44
+ comment: string;
45
+
46
+ @Column({
47
+ type: "enum",
48
+ enum: FoodApprovalStatus,
49
+ default: FoodApprovalStatus.PENDING,
50
+ nullable: false,
51
+ })
52
+ approval_status: FoodApprovalStatus;
53
+
54
+ @Column({ type: "boolean", default: true, nullable: false })
55
+ is_allowed: boolean;
56
+ }
@@ -0,0 +1,29 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "food_attachments" })
5
+ export class FoodRequestAttachment extends BaseModel {
6
+ @Column({ type: "integer", nullable: false })
7
+ request_id: number;
8
+
9
+ @Column({ type: "integer", nullable: true })
10
+ service_id: number | null;
11
+
12
+ @Column({ type: "integer", nullable: true })
13
+ sub_service_id: number | null;
14
+
15
+ @Column({ type: "varchar", length: 500, nullable: false })
16
+ file_url: string;
17
+
18
+ @Column({ type: "varchar", length: 255, nullable: true })
19
+ file_name: string;
20
+
21
+ @Column({ type: "varchar", length: 100, nullable: true })
22
+ file_type: string;
23
+
24
+ @Column({ type: "bigint", nullable: true })
25
+ file_size: number | null;
26
+
27
+ @Column({ type: "integer", nullable: true })
28
+ chat_id: number | null;
29
+ }
@@ -0,0 +1,42 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum FoodMessageType {
5
+ TEXT = "text",
6
+ IMAGE = "image",
7
+ VIDEO = "video",
8
+ FILE = "file",
9
+ LINK = "link",
10
+ }
11
+
12
+ @Entity({ name: "food_chats" })
13
+ export class FoodRequestChat extends BaseModel {
14
+ @Column({ type: "integer", nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: "integer", nullable: true })
18
+ service_id: number | null;
19
+
20
+ @Column({ type: "integer", nullable: true })
21
+ sub_service_id: number | null;
22
+
23
+ @Column({ type: "integer", nullable: false })
24
+ user_id: number;
25
+
26
+ @Column({ type: "integer", nullable: true })
27
+ role_id: number | null;
28
+
29
+ @Column({ type: "text", nullable: false })
30
+ message: string;
31
+
32
+ @Column({
33
+ type: "enum",
34
+ enum: FoodMessageType,
35
+ default: FoodMessageType.TEXT,
36
+ nullable: false,
37
+ })
38
+ messageType: FoodMessageType;
39
+
40
+ @Column({ type: "text", nullable: true })
41
+ status: string | null;
42
+ }
@@ -0,0 +1,47 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+ import { FoodMealTypeEnum, FoodRequestTypeEnum } from "./FoodRequestModel";
4
+
5
+ @Entity({ name: "food_histories" })
6
+ export class FoodHistory extends BaseModel {
7
+ /** Source `food_requests.id` when history was created on final approval. */
8
+ @Column({ type: "int", nullable: true })
9
+ request_id: number | null;
10
+
11
+ @Column({
12
+ type: "enum",
13
+ enum: FoodRequestTypeEnum,
14
+ enumName: "food_request_type_en",
15
+ nullable: true,
16
+ })
17
+ request_type: FoodRequestTypeEnum | null;
18
+
19
+ @Column({ type: "date", nullable: true })
20
+ event_date: string | null;
21
+
22
+ @Column({ type: "varchar", length: 50, nullable: true })
23
+ event_start_time: string | null;
24
+
25
+ @Column({ type: "varchar", length: 50, nullable: true })
26
+ event_end_time: string | null;
27
+
28
+ @Column({ type: "int", nullable: true })
29
+ hall_id: number | null;
30
+
31
+ @Column({ type: "varchar", length: 255, nullable: true })
32
+ hall_type: string | null;
33
+
34
+ @Column({ type: "int", nullable: true })
35
+ number_of_guests: number | null;
36
+
37
+ @Column({
38
+ type: "enum",
39
+ enum: FoodMealTypeEnum,
40
+ enumName: "food_meal_type_en",
41
+ nullable: true,
42
+ })
43
+ meal_type: FoodMealTypeEnum | null;
44
+
45
+ @Column({ type: "int", nullable: true })
46
+ department_id: number | null;
47
+ }
@@ -0,0 +1,84 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum FoodRequestStatus {
5
+ PENDING = "Pending",
6
+ IN_PROGRESS = "In Progress",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ CANCELLED = "Cancelled",
10
+ }
11
+
12
+ export enum FoodRequestTypeEnum {
13
+ INTERNAL = "Internal",
14
+ EXTERNAL = "External",
15
+ }
16
+
17
+ export enum FoodMealTypeEnum {
18
+ BREAKFAST = "Breakfast",
19
+ LUNCH = "Lunch",
20
+ DINNER = "Dinner",
21
+ }
22
+
23
+ @Entity({ name: "food_requests" })
24
+ export class FoodRequests extends BaseModel {
25
+ @Column({ type: "integer", nullable: true })
26
+ req_user_department_id: number | null;
27
+
28
+ @Column({ type: "integer", nullable: true })
29
+ req_user_section_id: number | null;
30
+
31
+ @Column({ type: "integer", nullable: true })
32
+ service_id: number | null;
33
+
34
+ @Column({ type: "integer", nullable: true })
35
+ sub_service_id: number | null;
36
+
37
+ @Column({ type: "integer", nullable: false })
38
+ user_id: number;
39
+
40
+ @Column({
41
+ type: "enum",
42
+ enum: FoodRequestTypeEnum,
43
+ enumName: "food_request_type_en",
44
+ nullable: false,
45
+ })
46
+ request_type: FoodRequestTypeEnum;
47
+
48
+ @Column({ type: "date", nullable: false })
49
+ event_date: string;
50
+
51
+ @Column({ type: "time", nullable: false })
52
+ event_start_time: string;
53
+
54
+ @Column({ type: "time", nullable: false })
55
+ event_end_time: string;
56
+
57
+ @Column({ type: "integer", nullable: true })
58
+ hall_id: number | null;
59
+
60
+ @Column({ type: "varchar", length: 255, nullable: true })
61
+ hall_type: string | null;
62
+
63
+ @Column({ type: "integer", nullable: true })
64
+ number_of_guests: number | null;
65
+
66
+ @Column({
67
+ type: "enum",
68
+ enum: FoodMealTypeEnum,
69
+ enumName: "food_meal_type_en",
70
+ nullable: true,
71
+ })
72
+ meal_type: FoodMealTypeEnum | null;
73
+
74
+ @Column({
75
+ type: "enum",
76
+ enum: FoodRequestStatus,
77
+ default: FoodRequestStatus.PENDING,
78
+ nullable: false,
79
+ })
80
+ status: FoodRequestStatus;
81
+
82
+ @Column({ type: "varchar", nullable: true })
83
+ workflow_execution_id: string | null;
84
+ }
@@ -0,0 +1,43 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum FoodWorkFlowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending",
8
+ }
9
+
10
+ @Entity({ name: "food_workflows" })
11
+ export class FoodWorkFlow extends BaseModel {
12
+ @Column({ type: "integer", nullable: false })
13
+ request_id: number;
14
+
15
+ @Column({ type: "integer", nullable: true })
16
+ service_id: number | null;
17
+
18
+ @Column({ type: "integer", nullable: true })
19
+ sub_service_id: number | null;
20
+
21
+ @Column({ type: "varchar", length: 500, nullable: false })
22
+ content: string;
23
+
24
+ @Column({
25
+ type: "enum",
26
+ enum: FoodWorkFlowStatus,
27
+ default: FoodWorkFlowStatus.NOT_YET_STARTED,
28
+ nullable: false,
29
+ })
30
+ status: FoodWorkFlowStatus;
31
+
32
+ @Column({ type: "integer", nullable: true })
33
+ user_id: number | null;
34
+
35
+ @Column({ type: "integer", nullable: true })
36
+ role_id: number | null;
37
+
38
+ @Column({ type: "integer", nullable: true })
39
+ department_id: number | null;
40
+
41
+ @Column({ type: "integer", nullable: true })
42
+ section_id: number | null;
43
+ }
@@ -3,6 +3,10 @@ import { BaseModel } from "./BaseModel";
3
3
 
4
4
  @Entity({ name: "multi_purpose_hall_histories" })
5
5
  export class MultiPurposeHallHistory extends BaseModel {
6
+ /** Source `multi_purpose_hall_requests.id` when history was created on final approval. */
7
+ @Column({ type: "int", nullable: true })
8
+ request_id: number | null;
9
+
6
10
  @Column({ type: "int", nullable: true })
7
11
  hall_id: number | null;
8
12