@platform-modules/civil-aviation-authority 2.3.5 → 2.3.7

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.
Files changed (33) hide show
  1. package/.env +14 -9
  2. package/dist/data-source.js +15 -1
  3. package/dist/index.d.ts +15 -2
  4. package/dist/index.js +16 -5
  5. package/dist/models/DutyMissionAirTicketDetailsModel.d.ts +20 -0
  6. package/dist/models/DutyMissionAirTicketDetailsModel.js +100 -0
  7. package/dist/models/DutyMissionApprovalModel.d.ts +23 -0
  8. package/dist/models/DutyMissionApprovalModel.js +96 -0
  9. package/dist/models/DutyMissionAttachmentModel.d.ts +12 -0
  10. package/dist/models/DutyMissionAttachmentModel.js +64 -0
  11. package/dist/models/DutyMissionChatModel.d.ts +19 -0
  12. package/dist/models/DutyMissionChatModel.js +77 -0
  13. package/dist/models/DutyMissionEmployeeDetailsModel.d.ts +17 -0
  14. package/dist/models/DutyMissionEmployeeDetailsModel.js +85 -0
  15. package/dist/models/DutyMissionRequestModel.d.ts +64 -0
  16. package/dist/models/DutyMissionRequestModel.js +237 -0
  17. package/dist/models/DutyMissionWorkflowModel.d.ts +18 -0
  18. package/dist/models/DutyMissionWorkflowModel.js +76 -0
  19. package/dist/models/Workflows.d.ts +0 -9
  20. package/package.json +1 -1
  21. package/src/data-source.ts +195 -181
  22. package/src/index.ts +111 -98
  23. package/src/models/DutyMissionAirTicketDetailsModel.ts +87 -0
  24. package/src/models/DutyMissionApprovalModel.ts +83 -0
  25. package/src/models/DutyMissionAttachmentModel.ts +51 -0
  26. package/src/models/DutyMissionChatModel.ts +65 -0
  27. package/src/models/DutyMissionEmployeeDetailsModel.ts +72 -0
  28. package/src/models/DutyMissionRequestModel.ts +224 -0
  29. package/src/models/DutyMissionWorkflowModel.ts +62 -0
  30. package/src/models/HrServiceRequestModel.ts +167 -167
  31. package/dist/models/TemporaryAssignmentRequestModel.d.ts +0 -49
  32. package/dist/models/TemporaryAssignmentRequestModel.js +0 -204
  33. package/src/models/TemporaryAssignmentRequestModel.ts +0 -194
package/.env CHANGED
@@ -1,12 +1,17 @@
1
- # DB_HOST=164.52.222.169
2
- # DB_PORT=5432
3
- # DB_USER=postgres_admin_user
4
- # DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
1
+ # DB_HOST=localhost
2
+ # DB_PORT=5433
3
+ # DB_USER=postgres
4
+ # DB_PASS=123
5
5
  # DB_NAME=CAA
6
6
 
7
+ DB_HOST=164.52.222.169
8
+ DB_PORT=5432
9
+ DB_USER=postgres_admin_user
10
+ DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
11
+ DB_NAME=CAA
7
12
 
8
- DB_HOST=localhost
9
- DB_PORT=5432
10
- DB_USER=postgres
11
- DB_PASS=stevejobs
12
- DB_NAME=CAA
13
+ # DB_HOST=216.48.187.46
14
+ # DB_PORT=5432
15
+ # DB_USER=adminuser
16
+ # DB_PASS=postgres_caa_fm_qa_34567
17
+ # DB_NAME=CAA_QA
@@ -82,6 +82,13 @@ const HrServiceWorkflowModel_1 = require("./models/HrServiceWorkflowModel");
82
82
  const HrServiceAttachmentModel_1 = require("./models/HrServiceAttachmentModel");
83
83
  const HrServiceChatModel_1 = require("./models/HrServiceChatModel");
84
84
  const TrainingRequestModel_1 = require("./models/TrainingRequestModel");
85
+ const DutyMissionRequestModel_1 = require("./models/DutyMissionRequestModel");
86
+ const DutyMissionApprovalModel_1 = require("./models/DutyMissionApprovalModel");
87
+ const DutyMissionWorkflowModel_1 = require("./models/DutyMissionWorkflowModel");
88
+ const DutyMissionAttachmentModel_1 = require("./models/DutyMissionAttachmentModel");
89
+ const DutyMissionChatModel_1 = require("./models/DutyMissionChatModel");
90
+ const DutyMissionEmployeeDetailsModel_1 = require("./models/DutyMissionEmployeeDetailsModel");
91
+ const DutyMissionAirTicketDetailsModel_1 = require("./models/DutyMissionAirTicketDetailsModel");
85
92
  const TrainingWorkflowModel_1 = require("./models/TrainingWorkflowModel");
86
93
  const TrainingApprovalModel_1 = require("./models/TrainingApprovalModel");
87
94
  const TrainingChatModel_1 = require("./models/TrainingChatModel");
@@ -177,6 +184,13 @@ exports.AppDataSource = new typeorm_1.DataSource({
177
184
  TrainingApprovalModel_1.TrainingApprovalDetails,
178
185
  TrainingChatModel_1.TrainingRequestChat,
179
186
  TrainingAttachmentModel_1.TrainingRequestAttachment,
180
- SecondmentRequestModel_1.SecondmentRequest
187
+ SecondmentRequestModel_1.SecondmentRequest,
188
+ DutyMissionRequestModel_1.DutyMissionRequests,
189
+ DutyMissionApprovalModel_1.DutyMissionApprovalDetails,
190
+ DutyMissionWorkflowModel_1.DutyMissionWorkFlow,
191
+ DutyMissionAttachmentModel_1.DutyMissionRequestAttachment,
192
+ DutyMissionChatModel_1.DutyMissionRequestChat,
193
+ DutyMissionEmployeeDetailsModel_1.DutyMissionEmployeeDetails,
194
+ DutyMissionAirTicketDetailsModel_1.DutyMissionAirTicketDetails
181
195
  ],
182
196
  });
package/dist/index.d.ts CHANGED
@@ -90,5 +90,18 @@ export { TrainingRequestChat } from './models/TrainingChatModel';
90
90
  export { TrainingMessageType } from './models/TrainingChatModel';
91
91
  export * from './models/SecondmentRequestModel';
92
92
  export { SecondmentRequestStatus } from './models/SecondmentRequestModel';
93
- export * from './models/TemporaryAssignmentRequestModel';
94
- export { TemporaryAssignmentRequestStatus, SalaryPaymentSource } from './models/TemporaryAssignmentRequestModel';
93
+ export * from './models/DutyMissionRequestModel';
94
+ export * from './models/DutyMissionApprovalModel';
95
+ export * from './models/DutyMissionWorkflowModel';
96
+ export * from './models/DutyMissionAttachmentModel';
97
+ export * from './models/DutyMissionChatModel';
98
+ export * from './models/DutyMissionEmployeeDetailsModel';
99
+ export * from './models/DutyMissionAirTicketDetailsModel';
100
+ export * from './models/DutyMissionRequestModel';
101
+ export * from './models/DutyMissionApprovalModel';
102
+ export * from './models/DutyMissionWorkflowModel';
103
+ export * from './models/DutyMissionAttachmentModel';
104
+ export * from './models/DutyMissionChatModel';
105
+ export * from './models/DutyMissionChatModel';
106
+ export * from './models/DutyMissionEmployeeDetailsModel';
107
+ export * from './models/DutyMissionAirTicketDetailsModel';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SalaryPaymentSource = exports.TemporaryAssignmentRequestStatus = exports.SecondmentRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
17
+ exports.SecondmentRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
18
18
  __exportStar(require("./models/user"), exports);
19
19
  __exportStar(require("./models/role"), exports);
20
20
  __exportStar(require("./models/user-sessions"), exports);
@@ -125,7 +125,18 @@ Object.defineProperty(exports, "TrainingMessageType", { enumerable: true, get: f
125
125
  __exportStar(require("./models/SecondmentRequestModel"), exports);
126
126
  var SecondmentRequestModel_1 = require("./models/SecondmentRequestModel");
127
127
  Object.defineProperty(exports, "SecondmentRequestStatus", { enumerable: true, get: function () { return SecondmentRequestModel_1.SecondmentRequestStatus; } });
128
- __exportStar(require("./models/TemporaryAssignmentRequestModel"), exports);
129
- var TemporaryAssignmentRequestModel_1 = require("./models/TemporaryAssignmentRequestModel");
130
- Object.defineProperty(exports, "TemporaryAssignmentRequestStatus", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.TemporaryAssignmentRequestStatus; } });
131
- Object.defineProperty(exports, "SalaryPaymentSource", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.SalaryPaymentSource; } });
128
+ __exportStar(require("./models/DutyMissionRequestModel"), exports);
129
+ __exportStar(require("./models/DutyMissionApprovalModel"), exports);
130
+ __exportStar(require("./models/DutyMissionWorkflowModel"), exports);
131
+ __exportStar(require("./models/DutyMissionAttachmentModel"), exports);
132
+ __exportStar(require("./models/DutyMissionChatModel"), exports);
133
+ __exportStar(require("./models/DutyMissionEmployeeDetailsModel"), exports);
134
+ __exportStar(require("./models/DutyMissionAirTicketDetailsModel"), exports);
135
+ __exportStar(require("./models/DutyMissionRequestModel"), exports);
136
+ __exportStar(require("./models/DutyMissionApprovalModel"), exports);
137
+ __exportStar(require("./models/DutyMissionWorkflowModel"), exports);
138
+ __exportStar(require("./models/DutyMissionAttachmentModel"), exports);
139
+ __exportStar(require("./models/DutyMissionChatModel"), exports);
140
+ __exportStar(require("./models/DutyMissionChatModel"), exports);
141
+ __exportStar(require("./models/DutyMissionEmployeeDetailsModel"), exports);
142
+ __exportStar(require("./models/DutyMissionAirTicketDetailsModel"), exports);
@@ -0,0 +1,20 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { DutyMissionRequests } from './DutyMissionRequestModel';
3
+ export declare class DutyMissionAirTicketDetails extends BaseModel {
4
+ request_id: number;
5
+ service_id: number | null;
6
+ sub_service_id: number | null;
7
+ employee_id: string;
8
+ employee_name: string;
9
+ ticket_type: string | null;
10
+ decision_date: Date | null;
11
+ departure_date: Date | null;
12
+ return_date: Date | null;
13
+ decision_number: string | null;
14
+ mission_number: string | null;
15
+ passport_no: string;
16
+ passport_issue_date: Date | null;
17
+ passport_expiry_date: Date | null;
18
+ request: DutyMissionRequests;
19
+ constructor(request_id: number, employee_id: string, employee_name: string, passport_no: string, service_id?: number | null, sub_service_id?: number | null, ticket_type?: string | null, decision_date?: Date | null, departure_date?: Date | null, return_date?: Date | null, decision_number?: string | null, mission_number?: string | null, passport_issue_date?: Date | null, passport_expiry_date?: Date | null);
20
+ }
@@ -0,0 +1,100 @@
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.DutyMissionAirTicketDetails = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const DutyMissionRequestModel_1 = require("./DutyMissionRequestModel");
16
+ let DutyMissionAirTicketDetails = class DutyMissionAirTicketDetails extends BaseModel_1.BaseModel {
17
+ constructor(request_id, employee_id, employee_name, passport_no, service_id, sub_service_id, ticket_type, decision_date, departure_date, return_date, decision_number, mission_number, passport_issue_date, passport_expiry_date) {
18
+ super();
19
+ this.request_id = request_id;
20
+ this.service_id = service_id ?? null;
21
+ this.sub_service_id = sub_service_id ?? null;
22
+ this.employee_id = employee_id;
23
+ this.employee_name = employee_name;
24
+ this.passport_no = passport_no;
25
+ this.ticket_type = ticket_type ?? null;
26
+ this.decision_date = decision_date ?? null;
27
+ this.departure_date = departure_date ?? null;
28
+ this.return_date = return_date ?? null;
29
+ this.decision_number = decision_number ?? null;
30
+ this.mission_number = mission_number ?? null;
31
+ this.passport_issue_date = passport_issue_date ?? null;
32
+ this.passport_expiry_date = passport_expiry_date ?? null;
33
+ }
34
+ };
35
+ exports.DutyMissionAirTicketDetails = DutyMissionAirTicketDetails;
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
38
+ __metadata("design:type", Number)
39
+ ], DutyMissionAirTicketDetails.prototype, "request_id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], DutyMissionAirTicketDetails.prototype, "service_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], DutyMissionAirTicketDetails.prototype, "sub_service_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
50
+ __metadata("design:type", String)
51
+ ], DutyMissionAirTicketDetails.prototype, "employee_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
54
+ __metadata("design:type", String)
55
+ ], DutyMissionAirTicketDetails.prototype, "employee_name", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
58
+ __metadata("design:type", Object)
59
+ ], DutyMissionAirTicketDetails.prototype, "ticket_type", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
62
+ __metadata("design:type", Object)
63
+ ], DutyMissionAirTicketDetails.prototype, "decision_date", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], DutyMissionAirTicketDetails.prototype, "departure_date", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], DutyMissionAirTicketDetails.prototype, "return_date", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
74
+ __metadata("design:type", Object)
75
+ ], DutyMissionAirTicketDetails.prototype, "decision_number", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], DutyMissionAirTicketDetails.prototype, "mission_number", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
82
+ __metadata("design:type", String)
83
+ ], DutyMissionAirTicketDetails.prototype, "passport_no", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
86
+ __metadata("design:type", Object)
87
+ ], DutyMissionAirTicketDetails.prototype, "passport_issue_date", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
90
+ __metadata("design:type", Object)
91
+ ], DutyMissionAirTicketDetails.prototype, "passport_expiry_date", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.ManyToOne)(() => DutyMissionRequestModel_1.DutyMissionRequests, { onDelete: 'CASCADE' }),
94
+ (0, typeorm_1.JoinColumn)({ name: 'request_id', referencedColumnName: 'id' }),
95
+ __metadata("design:type", DutyMissionRequestModel_1.DutyMissionRequests)
96
+ ], DutyMissionAirTicketDetails.prototype, "request", void 0);
97
+ exports.DutyMissionAirTicketDetails = DutyMissionAirTicketDetails = __decorate([
98
+ (0, typeorm_1.Entity)({ name: 'duty_mission_air_ticket_details' }),
99
+ __metadata("design:paramtypes", [Number, String, String, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
100
+ ], DutyMissionAirTicketDetails);
@@ -0,0 +1,23 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum DutyMissionApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class DutyMissionApprovalDetails extends BaseModel {
9
+ request_id: number;
10
+ service_id: number | null;
11
+ sub_service_id: number | null;
12
+ level: number;
13
+ approver_role_id: number;
14
+ department_id: number | null;
15
+ section_id: number | null;
16
+ approver_user_id: number | null;
17
+ delegate_user_id: number | null;
18
+ approved_by: number | null;
19
+ comment: string;
20
+ approval_status: DutyMissionApprovalStatus;
21
+ is_allowed: boolean;
22
+ constructor(request_id: number, approver_role_id: number, comment: string, approval_status: DutyMissionApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number, is_allowed?: boolean);
23
+ }
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DutyMissionApprovalDetails = exports.DutyMissionApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var DutyMissionApprovalStatus;
16
+ (function (DutyMissionApprovalStatus) {
17
+ DutyMissionApprovalStatus["PENDING"] = "Pending";
18
+ DutyMissionApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ DutyMissionApprovalStatus["APPROVED"] = "Approved";
20
+ DutyMissionApprovalStatus["REJECTED"] = "Rejected";
21
+ })(DutyMissionApprovalStatus || (exports.DutyMissionApprovalStatus = DutyMissionApprovalStatus = {}));
22
+ let DutyMissionApprovalDetails = class DutyMissionApprovalDetails extends BaseModel_1.BaseModel {
23
+ constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approver_user_id, delegate_user_id, approved_by, service_id, sub_service_id, is_allowed) {
24
+ super();
25
+ this.request_id = request_id;
26
+ this.service_id = service_id || null;
27
+ this.sub_service_id = sub_service_id || null;
28
+ this.approver_role_id = approver_role_id;
29
+ this.comment = comment;
30
+ this.approval_status = approval_status;
31
+ this.level = level;
32
+ this.department_id = department_id || null;
33
+ this.section_id = section_id || null;
34
+ this.approver_user_id = approver_user_id || null;
35
+ this.delegate_user_id = delegate_user_id || null;
36
+ this.approved_by = approved_by || null;
37
+ this.is_allowed = is_allowed !== undefined ? is_allowed : true;
38
+ }
39
+ };
40
+ exports.DutyMissionApprovalDetails = DutyMissionApprovalDetails;
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
43
+ __metadata("design:type", Number)
44
+ ], DutyMissionApprovalDetails.prototype, "request_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], DutyMissionApprovalDetails.prototype, "service_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], DutyMissionApprovalDetails.prototype, "sub_service_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
55
+ __metadata("design:type", Number)
56
+ ], DutyMissionApprovalDetails.prototype, "level", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], DutyMissionApprovalDetails.prototype, "approver_role_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], DutyMissionApprovalDetails.prototype, "department_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], DutyMissionApprovalDetails.prototype, "section_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], DutyMissionApprovalDetails.prototype, "approver_user_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], DutyMissionApprovalDetails.prototype, "delegate_user_id", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
79
+ __metadata("design:type", Object)
80
+ ], DutyMissionApprovalDetails.prototype, "approved_by", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
83
+ __metadata("design:type", String)
84
+ ], DutyMissionApprovalDetails.prototype, "comment", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ type: 'enum', enum: DutyMissionApprovalStatus, default: DutyMissionApprovalStatus.PENDING, nullable: false }),
87
+ __metadata("design:type", String)
88
+ ], DutyMissionApprovalDetails.prototype, "approval_status", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
91
+ __metadata("design:type", Boolean)
92
+ ], DutyMissionApprovalDetails.prototype, "is_allowed", void 0);
93
+ exports.DutyMissionApprovalDetails = DutyMissionApprovalDetails = __decorate([
94
+ (0, typeorm_1.Entity)({ name: 'duty_mission_approvals' }),
95
+ __metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object, Object, Object, Number, Number, Boolean])
96
+ ], DutyMissionApprovalDetails);
@@ -0,0 +1,12 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class DutyMissionRequestAttachment extends BaseModel {
3
+ request_id: number;
4
+ service_id: number | null;
5
+ sub_service_id: number | null;
6
+ file_url: string;
7
+ file_name: string;
8
+ file_type: string;
9
+ file_size: number | null;
10
+ chat_id: number | null;
11
+ constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number, chat_id?: number);
12
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DutyMissionRequestAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let DutyMissionRequestAttachment = class DutyMissionRequestAttachment extends BaseModel_1.BaseModel {
16
+ constructor(request_id, file_url, file_name, file_type, file_size, service_id, sub_service_id, chat_id) {
17
+ super();
18
+ this.request_id = request_id;
19
+ this.service_id = service_id || null;
20
+ this.sub_service_id = sub_service_id || null;
21
+ this.file_url = file_url;
22
+ this.file_name = file_name || '';
23
+ this.file_type = file_type || '';
24
+ this.file_size = file_size || null;
25
+ this.chat_id = chat_id || null;
26
+ }
27
+ };
28
+ exports.DutyMissionRequestAttachment = DutyMissionRequestAttachment;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], DutyMissionRequestAttachment.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], DutyMissionRequestAttachment.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], DutyMissionRequestAttachment.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
43
+ __metadata("design:type", String)
44
+ ], DutyMissionRequestAttachment.prototype, "file_url", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], DutyMissionRequestAttachment.prototype, "file_name", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], DutyMissionRequestAttachment.prototype, "file_type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], DutyMissionRequestAttachment.prototype, "file_size", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], DutyMissionRequestAttachment.prototype, "chat_id", void 0);
61
+ exports.DutyMissionRequestAttachment = DutyMissionRequestAttachment = __decorate([
62
+ (0, typeorm_1.Entity)({ name: 'duty_mission_attachments' }),
63
+ __metadata("design:paramtypes", [Number, String, String, String, Number, Number, Number, Number])
64
+ ], DutyMissionRequestAttachment);
@@ -0,0 +1,19 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum DutyMissionMessageType {
3
+ TEXT = "text",
4
+ IMAGE = "image",
5
+ VIDEO = "video",
6
+ FILE = "file",
7
+ LINK = "link"
8
+ }
9
+ export declare class DutyMissionRequestChat extends BaseModel {
10
+ request_id: number;
11
+ service_id: number | null;
12
+ sub_service_id: number | null;
13
+ user_id: number;
14
+ role_id: number;
15
+ message: string;
16
+ messageType: DutyMissionMessageType;
17
+ status: string | null;
18
+ constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: DutyMissionMessageType, status?: string | null);
19
+ }
@@ -0,0 +1,77 @@
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.DutyMissionRequestChat = exports.DutyMissionMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var DutyMissionMessageType;
16
+ (function (DutyMissionMessageType) {
17
+ DutyMissionMessageType["TEXT"] = "text";
18
+ DutyMissionMessageType["IMAGE"] = "image";
19
+ DutyMissionMessageType["VIDEO"] = "video";
20
+ DutyMissionMessageType["FILE"] = "file";
21
+ DutyMissionMessageType["LINK"] = "link";
22
+ })(DutyMissionMessageType || (exports.DutyMissionMessageType = DutyMissionMessageType = {}));
23
+ let DutyMissionRequestChat = class DutyMissionRequestChat extends BaseModel_1.BaseModel {
24
+ constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
25
+ super();
26
+ this.request_id = request_id;
27
+ this.service_id = service_id || null;
28
+ this.sub_service_id = sub_service_id || null;
29
+ this.user_id = user_id;
30
+ this.role_id = role_id;
31
+ this.message = message;
32
+ this.messageType = messageType || DutyMissionMessageType.TEXT;
33
+ this.status = status || null;
34
+ }
35
+ };
36
+ exports.DutyMissionRequestChat = DutyMissionRequestChat;
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], DutyMissionRequestChat.prototype, "request_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], DutyMissionRequestChat.prototype, "service_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], DutyMissionRequestChat.prototype, "sub_service_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
51
+ __metadata("design:type", Number)
52
+ ], DutyMissionRequestChat.prototype, "user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
55
+ __metadata("design:type", Number)
56
+ ], DutyMissionRequestChat.prototype, "role_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
59
+ __metadata("design:type", String)
60
+ ], DutyMissionRequestChat.prototype, "message", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ type: 'enum',
64
+ enum: DutyMissionMessageType,
65
+ default: DutyMissionMessageType.TEXT,
66
+ nullable: false
67
+ }),
68
+ __metadata("design:type", String)
69
+ ], DutyMissionRequestChat.prototype, "messageType", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
72
+ __metadata("design:type", Object)
73
+ ], DutyMissionRequestChat.prototype, "status", void 0);
74
+ exports.DutyMissionRequestChat = DutyMissionRequestChat = __decorate([
75
+ (0, typeorm_1.Entity)({ name: 'duty_mission_chats' }),
76
+ __metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, Object])
77
+ ], DutyMissionRequestChat);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { DutyMissionRequests } from './DutyMissionRequestModel';
3
+ export declare class DutyMissionEmployeeDetails extends BaseModel {
4
+ request_id: number;
5
+ service_id: number | null;
6
+ sub_service_id: number | null;
7
+ employee_id: string;
8
+ employee_name: string;
9
+ department: string | null;
10
+ grade: string | null;
11
+ position: string | null;
12
+ percentage: number | null;
13
+ allowance_per_day: number | null;
14
+ total_allowance: number | null;
15
+ request: DutyMissionRequests;
16
+ constructor(request_id: number, employee_id: string, employee_name: string, service_id?: number | null, sub_service_id?: number | null, department?: string | null, grade?: string | null, position?: string | null, percentage?: number | null, allowance_per_day?: number | null, total_allowance?: number | null);
17
+ }
@@ -0,0 +1,85 @@
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.DutyMissionEmployeeDetails = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const DutyMissionRequestModel_1 = require("./DutyMissionRequestModel");
16
+ let DutyMissionEmployeeDetails = class DutyMissionEmployeeDetails extends BaseModel_1.BaseModel {
17
+ constructor(request_id, employee_id, employee_name, service_id, sub_service_id, department, grade, position, percentage, allowance_per_day, total_allowance) {
18
+ super();
19
+ this.request_id = request_id;
20
+ this.service_id = service_id ?? null;
21
+ this.sub_service_id = sub_service_id ?? null;
22
+ this.employee_id = employee_id;
23
+ this.employee_name = employee_name;
24
+ this.department = department ?? null;
25
+ this.grade = grade ?? null;
26
+ this.position = position ?? null;
27
+ this.percentage = percentage ?? 100;
28
+ this.allowance_per_day = allowance_per_day ?? null;
29
+ this.total_allowance = total_allowance ?? null;
30
+ }
31
+ };
32
+ exports.DutyMissionEmployeeDetails = DutyMissionEmployeeDetails;
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], DutyMissionEmployeeDetails.prototype, "request_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], DutyMissionEmployeeDetails.prototype, "service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], DutyMissionEmployeeDetails.prototype, "sub_service_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], DutyMissionEmployeeDetails.prototype, "employee_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
51
+ __metadata("design:type", String)
52
+ ], DutyMissionEmployeeDetails.prototype, "employee_name", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], DutyMissionEmployeeDetails.prototype, "department", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], DutyMissionEmployeeDetails.prototype, "grade", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], DutyMissionEmployeeDetails.prototype, "position", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 5, scale: 2, nullable: true, default: 100 }),
67
+ __metadata("design:type", Object)
68
+ ], DutyMissionEmployeeDetails.prototype, "percentage", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], DutyMissionEmployeeDetails.prototype, "allowance_per_day", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], DutyMissionEmployeeDetails.prototype, "total_allowance", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.ManyToOne)(() => DutyMissionRequestModel_1.DutyMissionRequests, { onDelete: 'CASCADE' }),
79
+ (0, typeorm_1.JoinColumn)({ name: 'request_id', referencedColumnName: 'id' }),
80
+ __metadata("design:type", DutyMissionRequestModel_1.DutyMissionRequests)
81
+ ], DutyMissionEmployeeDetails.prototype, "request", void 0);
82
+ exports.DutyMissionEmployeeDetails = DutyMissionEmployeeDetails = __decorate([
83
+ (0, typeorm_1.Entity)({ name: 'duty_mission_employee_details' }),
84
+ __metadata("design:paramtypes", [Number, String, String, Object, Object, Object, Object, Object, Object, Object, Object])
85
+ ], DutyMissionEmployeeDetails);