@platform-modules/foreign-ministry 1.3.59 → 1.3.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env CHANGED
@@ -1,5 +1,5 @@
1
1
  DB_HOST=localhost
2
2
  DB_PORT=5432
3
3
  DB_USER=postgres
4
- DB_PASS=Fa@123
4
+ DB_PASS=stevejobs
5
5
  DB_NAME=FM
@@ -138,6 +138,9 @@ const HelpdeskKnowledgeBase_1 = require("./models/HelpdeskKnowledgeBase");
138
138
  const DiplomaticTitlesMasterModel_1 = require("./models/DiplomaticTitlesMasterModel");
139
139
  const DiplomaticOrganizationMasterModel_1 = require("./models/DiplomaticOrganizationMasterModel");
140
140
  const DiplomaticClubSubscriptionMasterModel_1 = require("./models/DiplomaticClubSubscriptionMasterModel");
141
+ const SecurityDeptMainRequestModel_1 = require("./models/SecurityDeptMainRequestModel");
142
+ const SecurityAttachmentsModel_1 = require("./models/SecurityAttachmentsModel");
143
+ const SecurityChatsModel_1 = require("./models/SecurityChatsModel");
141
144
  exports.AppDataSource = new typeorm_1.DataSource({
142
145
  type: 'postgres',
143
146
  host: process.env.DB_HOST || 'localhost',
@@ -280,6 +283,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
280
283
  HelpdeskAutoClosureConfig_1.HelpdeskAutoClosureConfig,
281
284
  DiplomaticTitlesMasterModel_1.DiplomaticTitlesMaster,
282
285
  DiplomaticOrganizationMasterModel_1.DiplomaticOrganizationMaster,
283
- DiplomaticClubSubscriptionMasterModel_1.DiplomaticClubSubscriptionMaster
286
+ DiplomaticClubSubscriptionMasterModel_1.DiplomaticClubSubscriptionMaster,
287
+ SecurityDeptMainRequestModel_1.SecurityDeptMainRequest,
288
+ SecurityAttachmentsModel_1.SecurityAttachment,
289
+ SecurityChatsModel_1.SecurityChat
284
290
  ],
285
291
  });
package/dist/index.d.ts CHANGED
@@ -184,6 +184,11 @@ export { RetiredCardWorkFlowStatus } from './models/RetiredCardWorkFlowModel';
184
184
  export * from './models/RetiredCardChatsModel';
185
185
  export { RetiredCardMessageType } from './models/RetiredCardChatsModel';
186
186
  export * from './models/RetiredCardAttachmentsModel';
187
+ export * from './models/SecurityDeptMainRequestModel';
188
+ export { SecurityDeptRequestStatus, SecurityDeptAccessType } from './models/SecurityDeptMainRequestModel';
189
+ export * from './models/SecurityAttachmentsModel';
190
+ export * from './models/SecurityChatsModel';
191
+ export { SecurityDeptMessageType } from './models/SecurityChatsModel';
187
192
  export * from './models/GatePassRequestsModel';
188
193
  export { GatePassRequestStatus, GatePassType } from './models/GatePassRequestsModel';
189
194
  export * from './models/GatePassVisitorsModel';
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.TravelClass = exports.MissionTravelWorkFlowStatus = exports.MissionTravelApprovalStatus = exports.AllowanceRatio = exports.DecisionType = exports.MissionType = exports.MissionTravelStatus = exports.GatePassMessageType = exports.GatePassWorkFlowStatus = exports.GatePassApprovalStatus = exports.GatePassType = exports.GatePassRequestStatus = exports.RetiredCardMessageType = exports.RetiredCardWorkFlowStatus = exports.RetiredCardApprovalStatus = exports.RetiredCardAccessType = exports.RetiredCardRequestStatus = exports.TitleCategory = exports.ProfileUpdateRequestStatus = exports.StayAfterHoursTransactionStatus = exports.StayAfterHoursTransaction = exports.StayAfterHoursBalance = exports.EarlyCheckoutTransactionStatus = exports.EarlyCheckoutTransaction = exports.EarlyCheckoutFrequency = exports.EarlyCheckoutConfiguration = exports.EarlyCheckoutBalance = exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = exports.ParcelDepartmentCategory = void 0;
17
+ exports.TravelClass = exports.MissionTravelWorkFlowStatus = exports.MissionTravelApprovalStatus = exports.AllowanceRatio = exports.DecisionType = exports.MissionType = exports.MissionTravelStatus = exports.GatePassMessageType = exports.GatePassWorkFlowStatus = exports.GatePassApprovalStatus = exports.GatePassType = exports.GatePassRequestStatus = exports.SecurityDeptMessageType = exports.SecurityDeptAccessType = exports.SecurityDeptRequestStatus = exports.RetiredCardMessageType = exports.RetiredCardWorkFlowStatus = exports.RetiredCardApprovalStatus = exports.RetiredCardAccessType = exports.RetiredCardRequestStatus = exports.TitleCategory = exports.ProfileUpdateRequestStatus = exports.StayAfterHoursTransactionStatus = exports.StayAfterHoursTransaction = exports.StayAfterHoursBalance = exports.EarlyCheckoutTransactionStatus = exports.EarlyCheckoutTransaction = exports.EarlyCheckoutFrequency = exports.EarlyCheckoutConfiguration = exports.EarlyCheckoutBalance = exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = exports.ParcelDepartmentCategory = void 0;
18
18
  __exportStar(require("./models/user"), exports);
19
19
  __exportStar(require("./models/role"), exports);
20
20
  __exportStar(require("./models/user-sessions"), exports);
@@ -223,6 +223,15 @@ __exportStar(require("./models/RetiredCardChatsModel"), exports);
223
223
  var RetiredCardChatsModel_1 = require("./models/RetiredCardChatsModel");
224
224
  Object.defineProperty(exports, "RetiredCardMessageType", { enumerable: true, get: function () { return RetiredCardChatsModel_1.RetiredCardMessageType; } });
225
225
  __exportStar(require("./models/RetiredCardAttachmentsModel"), exports);
226
+ // Security Department Models
227
+ __exportStar(require("./models/SecurityDeptMainRequestModel"), exports);
228
+ var SecurityDeptMainRequestModel_1 = require("./models/SecurityDeptMainRequestModel");
229
+ Object.defineProperty(exports, "SecurityDeptRequestStatus", { enumerable: true, get: function () { return SecurityDeptMainRequestModel_1.SecurityDeptRequestStatus; } });
230
+ Object.defineProperty(exports, "SecurityDeptAccessType", { enumerable: true, get: function () { return SecurityDeptMainRequestModel_1.SecurityDeptAccessType; } });
231
+ __exportStar(require("./models/SecurityAttachmentsModel"), exports);
232
+ __exportStar(require("./models/SecurityChatsModel"), exports);
233
+ var SecurityChatsModel_1 = require("./models/SecurityChatsModel");
234
+ Object.defineProperty(exports, "SecurityDeptMessageType", { enumerable: true, get: function () { return SecurityChatsModel_1.SecurityDeptMessageType; } });
226
235
  // Gate Pass Models
227
236
  __exportStar(require("./models/GatePassRequestsModel"), exports);
228
237
  var GatePassRequestsModel_1 = require("./models/GatePassRequestsModel");
@@ -3,5 +3,6 @@ export declare class Departments extends BaseModel {
3
3
  department_name: string;
4
4
  department_code: string;
5
5
  department_description: string;
6
- constructor(department_name: string, department_code: string, department_description: string);
6
+ undersecretary_department_id: number | null;
7
+ constructor(department_name: string, department_code: string, department_description: string, undersecretary_department_id?: number | null);
7
8
  }
@@ -13,11 +13,12 @@ exports.Departments = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let Departments = class Departments extends BaseModel_1.BaseModel {
16
- constructor(department_name, department_code, department_description) {
16
+ constructor(department_name, department_code, department_description, undersecretary_department_id) {
17
17
  super();
18
18
  this.department_name = department_name;
19
19
  this.department_code = department_code;
20
20
  this.department_description = department_description;
21
+ this.undersecretary_department_id = undersecretary_department_id ?? null;
21
22
  }
22
23
  };
23
24
  exports.Departments = Departments;
@@ -33,7 +34,11 @@ __decorate([
33
34
  (0, typeorm_1.Column)({ nullable: false }),
34
35
  __metadata("design:type", String)
35
36
  ], Departments.prototype, "department_description", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], Departments.prototype, "undersecretary_department_id", void 0);
36
41
  exports.Departments = Departments = __decorate([
37
42
  (0, typeorm_1.Entity)({ name: 'departments' }),
38
- __metadata("design:paramtypes", [String, String, String])
43
+ __metadata("design:paramtypes", [String, String, String, Object])
39
44
  ], Departments);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { TravelClass } from './MissionTravelPersonModel';
3
+ export declare class MissionTravelClassConfig extends BaseModel {
4
+ grade: number | null;
5
+ position: string | null;
6
+ travel_class: TravelClass;
7
+ is_active: boolean;
8
+ description: string | null;
9
+ constructor(grade: number | null, position: string | null, travel_class: TravelClass, description: string | null);
10
+ }
@@ -0,0 +1,50 @@
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.MissionTravelClassConfig = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const MissionTravelPersonModel_1 = require("./MissionTravelPersonModel");
16
+ let MissionTravelClassConfig = class MissionTravelClassConfig extends BaseModel_1.BaseModel {
17
+ constructor(grade, position, travel_class, description) {
18
+ super();
19
+ this.grade = grade;
20
+ this.position = position;
21
+ this.travel_class = travel_class;
22
+ this.description = description;
23
+ this.is_active = true;
24
+ }
25
+ };
26
+ exports.MissionTravelClassConfig = MissionTravelClassConfig;
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
29
+ __metadata("design:type", Object)
30
+ ], MissionTravelClassConfig.prototype, "grade", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
33
+ __metadata("design:type", Object)
34
+ ], MissionTravelClassConfig.prototype, "position", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'enum', enum: MissionTravelPersonModel_1.TravelClass, nullable: false }),
37
+ __metadata("design:type", String)
38
+ ], MissionTravelClassConfig.prototype, "travel_class", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
41
+ __metadata("design:type", Boolean)
42
+ ], MissionTravelClassConfig.prototype, "is_active", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], MissionTravelClassConfig.prototype, "description", void 0);
47
+ exports.MissionTravelClassConfig = MissionTravelClassConfig = __decorate([
48
+ (0, typeorm_1.Entity)({ name: 'mission_travel_class_config' }),
49
+ __metadata("design:paramtypes", [Object, Object, String, Object])
50
+ ], MissionTravelClassConfig);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class MissionTravelPerdiem extends BaseModel {
3
+ grade: number;
4
+ perdiem_amount: number;
5
+ currency: string | null;
6
+ effective_from: Date | null;
7
+ effective_to: Date | null;
8
+ is_active: boolean;
9
+ constructor(grade: number, perdiem_amount: number, currency: string | null, effective_from: Date | null, effective_to: Date | null);
10
+ }
@@ -0,0 +1,54 @@
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.MissionTravelPerdiem = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let MissionTravelPerdiem = class MissionTravelPerdiem extends BaseModel_1.BaseModel {
16
+ constructor(grade, perdiem_amount, currency, effective_from, effective_to) {
17
+ super();
18
+ this.grade = grade;
19
+ this.perdiem_amount = perdiem_amount;
20
+ this.currency = currency;
21
+ this.effective_from = effective_from;
22
+ this.effective_to = effective_to;
23
+ this.is_active = true;
24
+ }
25
+ };
26
+ exports.MissionTravelPerdiem = MissionTravelPerdiem;
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
29
+ __metadata("design:type", Number)
30
+ ], MissionTravelPerdiem.prototype, "grade", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], MissionTravelPerdiem.prototype, "perdiem_amount", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], MissionTravelPerdiem.prototype, "currency", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], MissionTravelPerdiem.prototype, "effective_from", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], MissionTravelPerdiem.prototype, "effective_to", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
49
+ __metadata("design:type", Boolean)
50
+ ], MissionTravelPerdiem.prototype, "is_active", void 0);
51
+ exports.MissionTravelPerdiem = MissionTravelPerdiem = __decorate([
52
+ (0, typeorm_1.Entity)({ name: 'mission_travel_perdiem' }),
53
+ __metadata("design:paramtypes", [Number, Number, Object, Object, Object])
54
+ ], MissionTravelPerdiem);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /**
3
+ * Security Department Request Attachment Table
4
+ * Stores file attachments for security department requests
5
+ */
6
+ export declare class SecurityAttachment extends BaseModel {
7
+ request_id: number;
8
+ service_id: number | null;
9
+ sub_service_id: number | null;
10
+ file_url: string;
11
+ file_name: string;
12
+ file_type: string;
13
+ file_size: number | null;
14
+ chat_id: number | null;
15
+ description: string | null;
16
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SecurityAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ /**
16
+ * Security Department Request Attachment Table
17
+ * Stores file attachments for security department requests
18
+ */
19
+ let SecurityAttachment = class SecurityAttachment extends BaseModel_1.BaseModel {
20
+ };
21
+ exports.SecurityAttachment = SecurityAttachment;
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
24
+ __metadata("design:type", Number)
25
+ ], SecurityAttachment.prototype, "request_id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
28
+ __metadata("design:type", Object)
29
+ ], SecurityAttachment.prototype, "service_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], SecurityAttachment.prototype, "sub_service_id", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
36
+ __metadata("design:type", String)
37
+ ], SecurityAttachment.prototype, "file_url", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], SecurityAttachment.prototype, "file_name", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], SecurityAttachment.prototype, "file_type", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], SecurityAttachment.prototype, "file_size", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
52
+ __metadata("design:type", Object)
53
+ ], SecurityAttachment.prototype, "chat_id", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
56
+ __metadata("design:type", Object)
57
+ ], SecurityAttachment.prototype, "description", void 0);
58
+ exports.SecurityAttachment = SecurityAttachment = __decorate([
59
+ (0, typeorm_1.Entity)({ name: 'security_attachments' })
60
+ ], SecurityAttachment);
@@ -0,0 +1,26 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /**
3
+ * Security Department Message Type Enum
4
+ */
5
+ export declare enum SecurityDeptMessageType {
6
+ TEXT = "text",
7
+ IMAGE = "image",
8
+ VIDEO = "video",
9
+ FILE = "file",
10
+ LINK = "link"
11
+ }
12
+ /**
13
+ * Security Department Request Chat Table
14
+ * Stores chat messages for security department requests
15
+ */
16
+ export declare class SecurityChat extends BaseModel {
17
+ request_id: number;
18
+ service_id: number | null;
19
+ sub_service_id: number | null;
20
+ user_id: number;
21
+ role_id: number;
22
+ message: string;
23
+ messageType: SecurityDeptMessageType;
24
+ status: string;
25
+ constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: SecurityDeptMessageType, status?: string);
26
+ }
@@ -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.SecurityChat = exports.SecurityDeptMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ /**
16
+ * Security Department Message Type Enum
17
+ */
18
+ var SecurityDeptMessageType;
19
+ (function (SecurityDeptMessageType) {
20
+ SecurityDeptMessageType["TEXT"] = "text";
21
+ SecurityDeptMessageType["IMAGE"] = "image";
22
+ SecurityDeptMessageType["VIDEO"] = "video";
23
+ SecurityDeptMessageType["FILE"] = "file";
24
+ SecurityDeptMessageType["LINK"] = "link";
25
+ })(SecurityDeptMessageType || (exports.SecurityDeptMessageType = SecurityDeptMessageType = {}));
26
+ /**
27
+ * Security Department Request Chat Table
28
+ * Stores chat messages for security department requests
29
+ */
30
+ let SecurityChat = class SecurityChat extends BaseModel_1.BaseModel {
31
+ constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
32
+ super();
33
+ this.request_id = request_id;
34
+ this.service_id = service_id || null;
35
+ this.sub_service_id = sub_service_id || null;
36
+ this.user_id = user_id;
37
+ this.role_id = role_id;
38
+ this.message = message;
39
+ this.messageType = messageType || SecurityDeptMessageType.TEXT;
40
+ this.status = status || 'Pending';
41
+ }
42
+ };
43
+ exports.SecurityChat = SecurityChat;
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
46
+ __metadata("design:type", Number)
47
+ ], SecurityChat.prototype, "request_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], SecurityChat.prototype, "service_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], SecurityChat.prototype, "sub_service_id", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
58
+ __metadata("design:type", Number)
59
+ ], SecurityChat.prototype, "user_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
62
+ __metadata("design:type", Number)
63
+ ], SecurityChat.prototype, "role_id", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
66
+ __metadata("design:type", String)
67
+ ], SecurityChat.prototype, "message", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({
70
+ type: 'enum',
71
+ enum: SecurityDeptMessageType,
72
+ default: SecurityDeptMessageType.TEXT,
73
+ nullable: false
74
+ }),
75
+ __metadata("design:type", String)
76
+ ], SecurityChat.prototype, "messageType", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
79
+ __metadata("design:type", String)
80
+ ], SecurityChat.prototype, "status", void 0);
81
+ exports.SecurityChat = SecurityChat = __decorate([
82
+ (0, typeorm_1.Entity)({ name: 'security_chats' }),
83
+ __metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
84
+ ], SecurityChat);
@@ -0,0 +1,38 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /**
3
+ * Security Department Request Status Enum
4
+ */
5
+ export declare enum SecurityDeptRequestStatus {
6
+ PENDING = "Pending",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ IN_PROGRESS = "In Progress"
10
+ }
11
+ /**
12
+ * Access Type Enum - Normal
13
+ */
14
+ export declare enum SecurityDeptAccessType {
15
+ NORMAL = "Normal"
16
+ }
17
+ /**
18
+ * Security Department Main Request Table
19
+ * This table stores the primary security department request data
20
+ * No workflow concept involved
21
+ */
22
+ export declare class SecurityDeptMainRequest extends BaseModel {
23
+ user_id: number;
24
+ req_user_department_id: number | null;
25
+ req_user_section_id: number | null;
26
+ service_id: number | null;
27
+ sub_service_id: number | null;
28
+ status: SecurityDeptRequestStatus;
29
+ name: string | null;
30
+ former_designation_role: string;
31
+ retirement_effective_date: Date | null;
32
+ original_card_issue_date: Date | null;
33
+ reason_for_card_generation: string;
34
+ access_type: SecurityDeptAccessType;
35
+ photo_url: string | null;
36
+ photo_file_name: string | null;
37
+ constructor(user_id: number, req_user_department_id: number | null, req_user_section_id: number | null, service_id: number | null, sub_service_id: number | null, status: SecurityDeptRequestStatus, name: string | null, former_designation_role: string, retirement_effective_date: Date | null, original_card_issue_date: Date | null, reason_for_card_generation: string, access_type: SecurityDeptAccessType, photo_url: string | null, photo_file_name: string | null);
38
+ }
@@ -0,0 +1,116 @@
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.SecurityDeptMainRequest = exports.SecurityDeptAccessType = exports.SecurityDeptRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ /**
16
+ * Security Department Request Status Enum
17
+ */
18
+ var SecurityDeptRequestStatus;
19
+ (function (SecurityDeptRequestStatus) {
20
+ SecurityDeptRequestStatus["PENDING"] = "Pending";
21
+ SecurityDeptRequestStatus["APPROVED"] = "Approved";
22
+ SecurityDeptRequestStatus["REJECTED"] = "Rejected";
23
+ SecurityDeptRequestStatus["IN_PROGRESS"] = "In Progress";
24
+ })(SecurityDeptRequestStatus || (exports.SecurityDeptRequestStatus = SecurityDeptRequestStatus = {}));
25
+ /**
26
+ * Access Type Enum - Normal
27
+ */
28
+ var SecurityDeptAccessType;
29
+ (function (SecurityDeptAccessType) {
30
+ SecurityDeptAccessType["NORMAL"] = "Normal";
31
+ })(SecurityDeptAccessType || (exports.SecurityDeptAccessType = SecurityDeptAccessType = {}));
32
+ /**
33
+ * Security Department Main Request Table
34
+ * This table stores the primary security department request data
35
+ * No workflow concept involved
36
+ */
37
+ let SecurityDeptMainRequest = class SecurityDeptMainRequest extends BaseModel_1.BaseModel {
38
+ constructor(user_id, req_user_department_id, req_user_section_id, service_id, sub_service_id, status, name, former_designation_role, retirement_effective_date, original_card_issue_date, reason_for_card_generation, access_type, photo_url, photo_file_name) {
39
+ super();
40
+ this.user_id = user_id;
41
+ this.req_user_department_id = req_user_department_id;
42
+ this.req_user_section_id = req_user_section_id;
43
+ this.service_id = service_id;
44
+ this.sub_service_id = sub_service_id;
45
+ this.status = status;
46
+ this.name = name;
47
+ this.former_designation_role = former_designation_role;
48
+ this.retirement_effective_date = retirement_effective_date;
49
+ this.original_card_issue_date = original_card_issue_date;
50
+ this.reason_for_card_generation = reason_for_card_generation;
51
+ this.access_type = access_type;
52
+ this.photo_url = photo_url;
53
+ this.photo_file_name = photo_file_name;
54
+ }
55
+ };
56
+ exports.SecurityDeptMainRequest = SecurityDeptMainRequest;
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
59
+ __metadata("design:type", Number)
60
+ ], SecurityDeptMainRequest.prototype, "user_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], SecurityDeptMainRequest.prototype, "req_user_department_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], SecurityDeptMainRequest.prototype, "req_user_section_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], SecurityDeptMainRequest.prototype, "service_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], SecurityDeptMainRequest.prototype, "sub_service_id", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: 'enum', enum: SecurityDeptRequestStatus, default: SecurityDeptRequestStatus.PENDING, nullable: false }),
79
+ __metadata("design:type", String)
80
+ ], SecurityDeptMainRequest.prototype, "status", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
83
+ __metadata("design:type", Object)
84
+ ], SecurityDeptMainRequest.prototype, "name", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
87
+ __metadata("design:type", String)
88
+ ], SecurityDeptMainRequest.prototype, "former_designation_role", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
91
+ __metadata("design:type", Object)
92
+ ], SecurityDeptMainRequest.prototype, "retirement_effective_date", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
95
+ __metadata("design:type", Object)
96
+ ], SecurityDeptMainRequest.prototype, "original_card_issue_date", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
99
+ __metadata("design:type", String)
100
+ ], SecurityDeptMainRequest.prototype, "reason_for_card_generation", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({ type: 'enum', enum: SecurityDeptAccessType, default: SecurityDeptAccessType.NORMAL, nullable: false }),
103
+ __metadata("design:type", String)
104
+ ], SecurityDeptMainRequest.prototype, "access_type", void 0);
105
+ __decorate([
106
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
107
+ __metadata("design:type", Object)
108
+ ], SecurityDeptMainRequest.prototype, "photo_url", void 0);
109
+ __decorate([
110
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
111
+ __metadata("design:type", Object)
112
+ ], SecurityDeptMainRequest.prototype, "photo_file_name", void 0);
113
+ exports.SecurityDeptMainRequest = SecurityDeptMainRequest = __decorate([
114
+ (0, typeorm_1.Entity)({ name: 'security_dept_main_request' }),
115
+ __metadata("design:paramtypes", [Number, Object, Object, Object, Object, String, Object, String, Object, Object, String, String, Object, Object])
116
+ ], SecurityDeptMainRequest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.59",
3
+ "version": "1.3.61",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -144,6 +144,9 @@ import { HelpdeskKnowledgeBase } from './models/HelpdeskKnowledgeBase'
144
144
  import { DiplomaticTitlesMaster } from './models/DiplomaticTitlesMasterModel'
145
145
  import { DiplomaticOrganizationMaster } from './models/DiplomaticOrganizationMasterModel'
146
146
  import { DiplomaticClubSubscriptionMaster } from './models/DiplomaticClubSubscriptionMasterModel'
147
+ import { SecurityDeptMainRequest } from './models/SecurityDeptMainRequestModel';
148
+ import { SecurityAttachment } from './models/SecurityAttachmentsModel';
149
+ import { SecurityChat } from './models/SecurityChatsModel';
147
150
 
148
151
 
149
152
  export const AppDataSource = new DataSource({
@@ -288,6 +291,9 @@ export const AppDataSource = new DataSource({
288
291
  HelpdeskAutoClosureConfig,
289
292
  DiplomaticTitlesMaster,
290
293
  DiplomaticOrganizationMaster,
291
- DiplomaticClubSubscriptionMaster
294
+ DiplomaticClubSubscriptionMaster,
295
+ SecurityDeptMainRequest,
296
+ SecurityAttachment,
297
+ SecurityChat
292
298
  ],
293
299
  });
package/src/index.ts CHANGED
@@ -185,6 +185,12 @@ export { RetiredCardWorkFlowStatus } from './models/RetiredCardWorkFlowModel';
185
185
  export * from './models/RetiredCardChatsModel';
186
186
  export { RetiredCardMessageType } from './models/RetiredCardChatsModel';
187
187
  export * from './models/RetiredCardAttachmentsModel';
188
+ // Security Department Models
189
+ export * from './models/SecurityDeptMainRequestModel';
190
+ export { SecurityDeptRequestStatus, SecurityDeptAccessType } from './models/SecurityDeptMainRequestModel';
191
+ export * from './models/SecurityAttachmentsModel';
192
+ export * from './models/SecurityChatsModel';
193
+ export { SecurityDeptMessageType } from './models/SecurityChatsModel';
188
194
  // Gate Pass Models
189
195
  export * from './models/GatePassRequestsModel';
190
196
  export { GatePassRequestStatus, GatePassType } from './models/GatePassRequestsModel';
@@ -13,14 +13,19 @@ export class Departments extends BaseModel {
13
13
  @Column({ nullable: false })
14
14
  department_description: string;
15
15
 
16
+ @Column({ type: 'bigint', nullable: true })
17
+ undersecretary_department_id: number | null;
18
+
16
19
  constructor(
17
20
  department_name: string,
18
21
  department_code: string,
19
22
  department_description: string,
23
+ undersecretary_department_id?: number | null,
20
24
  ) {
21
25
  super();
22
26
  this.department_name = department_name
23
27
  this.department_code = department_code
24
28
  this.department_description = department_description
29
+ this.undersecretary_department_id = undersecretary_department_id ?? null
25
30
  }
26
31
  }