@platform-modules/civil-aviation-authority 2.0.11 → 2.0.13

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.
@@ -41,6 +41,7 @@ const LogisticsChatModel_1 = require("./models/LogisticsChatModel");
41
41
  const LogisticsAttachmentModel_1 = require("./models/LogisticsAttachmentModel");
42
42
  const LogisticsWorkflowModel_1 = require("./models/LogisticsWorkflowModel");
43
43
  const importantLinksModel_1 = require("./models/importantLinksModel");
44
+ const DelegateSettingsModel_1 = require("./models/DelegateSettingsModel");
44
45
  exports.AppDataSource = new typeorm_1.DataSource({
45
46
  type: 'postgres',
46
47
  host: process.env.DB_HOST || 'localhost',
@@ -85,6 +86,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
85
86
  LogisticsChatModel_1.LogisticsRequestChat,
86
87
  LogisticsAttachmentModel_1.LogisticsRequestAttachment,
87
88
  LogisticsWorkflowModel_1.LogisticsWorkFlow,
88
- importantLinksModel_1.ImportantLinks
89
+ importantLinksModel_1.ImportantLinks,
90
+ DelegateSettingsModel_1.DelegateSettings
89
91
  ],
90
92
  });
package/dist/index.d.ts CHANGED
@@ -33,3 +33,4 @@ export * from './models/LogisticsChatModel';
33
33
  export * from './models/LogisticsAttachmentModel';
34
34
  export * from './models/importantLinksModel';
35
35
  export * from './models/LogisticsWorkflowModel';
36
+ export * from './models/DelegateSettingsModel';
package/dist/index.js CHANGED
@@ -50,3 +50,4 @@ __exportStar(require("./models/LogisticsChatModel"), exports);
50
50
  __exportStar(require("./models/LogisticsAttachmentModel"), exports);
51
51
  __exportStar(require("./models/importantLinksModel"), exports);
52
52
  __exportStar(require("./models/LogisticsWorkflowModel"), exports);
53
+ __exportStar(require("./models/DelegateSettingsModel"), exports);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class DelegateSettings extends BaseModel {
3
+ user_id: number;
4
+ from_date: Date;
5
+ to_date: Date;
6
+ delegate_to: number;
7
+ is_active: boolean;
8
+ constructor(user_id: number, from_date: Date, to_date: Date, delegate_to: number, is_active?: boolean);
9
+ }
@@ -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.DelegateSettings = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let DelegateSettings = class DelegateSettings extends BaseModel_1.BaseModel {
16
+ constructor(user_id, from_date, to_date, delegate_to, is_active = true) {
17
+ super();
18
+ this.user_id = user_id;
19
+ this.from_date = from_date;
20
+ this.to_date = to_date;
21
+ this.delegate_to = delegate_to;
22
+ this.is_active = is_active;
23
+ }
24
+ };
25
+ exports.DelegateSettings = DelegateSettings;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], DelegateSettings.prototype, "user_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
32
+ __metadata("design:type", Date)
33
+ ], DelegateSettings.prototype, "from_date", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
36
+ __metadata("design:type", Date)
37
+ ], DelegateSettings.prototype, "to_date", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], DelegateSettings.prototype, "delegate_to", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
44
+ __metadata("design:type", Boolean)
45
+ ], DelegateSettings.prototype, "is_active", void 0);
46
+ exports.DelegateSettings = DelegateSettings = __decorate([
47
+ (0, typeorm_1.Entity)({ name: 'delegate_settings' }),
48
+ __metadata("design:paramtypes", [Number, Date,
49
+ Date, Number, Boolean])
50
+ ], DelegateSettings);
@@ -13,6 +13,8 @@ export declare class Notification extends BaseModel {
13
13
  content: any;
14
14
  is_read: boolean;
15
15
  request_id: number;
16
+ service_id: number;
17
+ sub_service_id: number;
16
18
  route_path: string;
17
- constructor(type: NotificationType, user_id: number, role_id: number, department_id: number, section_id: number, content: any, is_read: boolean, request_id: number, route_path: string);
19
+ constructor(type: NotificationType, user_id: number, role_id: number, department_id: number, section_id: number, content: any, is_read: boolean, request_id: number, service_id: number, sub_service_id: number, route_path: string);
18
20
  }
@@ -19,7 +19,7 @@ var NotificationType;
19
19
  NotificationType["IMPORT"] = "import";
20
20
  })(NotificationType || (exports.NotificationType = NotificationType = {}));
21
21
  let Notification = class Notification extends BaseModel_1.BaseModel {
22
- constructor(type, user_id, role_id, department_id, section_id, content, is_read, request_id, route_path) {
22
+ constructor(type, user_id, role_id, department_id, section_id, content, is_read, request_id, service_id, sub_service_id, route_path) {
23
23
  super();
24
24
  this.type = type;
25
25
  this.user_id = user_id;
@@ -29,6 +29,8 @@ let Notification = class Notification extends BaseModel_1.BaseModel {
29
29
  this.content = content;
30
30
  this.is_read = is_read;
31
31
  this.request_id = request_id;
32
+ this.service_id = service_id;
33
+ this.sub_service_id = sub_service_id;
32
34
  this.route_path = route_path;
33
35
  }
34
36
  };
@@ -69,11 +71,19 @@ __decorate([
69
71
  (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
70
72
  __metadata("design:type", Number)
71
73
  ], Notification.prototype, "request_id", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
76
+ __metadata("design:type", Number)
77
+ ], Notification.prototype, "service_id", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
80
+ __metadata("design:type", Number)
81
+ ], Notification.prototype, "sub_service_id", void 0);
72
82
  __decorate([
73
83
  (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
74
84
  __metadata("design:type", String)
75
85
  ], Notification.prototype, "route_path", void 0);
76
86
  exports.Notification = Notification = __decorate([
77
87
  (0, typeorm_1.Entity)({ name: 'notification' }),
78
- __metadata("design:paramtypes", [String, Number, Number, Number, Number, Object, Boolean, Number, String])
88
+ __metadata("design:paramtypes", [String, Number, Number, Number, Number, Object, Boolean, Number, Number, Number, String])
79
89
  ], Notification);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -38,7 +38,7 @@ import { LogisticsRequestChat } from './models/LogisticsChatModel';
38
38
  import { LogisticsRequestAttachment } from './models/LogisticsAttachmentModel';
39
39
  import { LogisticsWorkFlow } from './models/LogisticsWorkflowModel';
40
40
  import { ImportantLinks } from './models/importantLinksModel';
41
-
41
+ import { DelegateSettings } from './models/DelegateSettingsModel';
42
42
 
43
43
 
44
44
  export const AppDataSource = new DataSource({
@@ -85,6 +85,7 @@ export const AppDataSource = new DataSource({
85
85
  LogisticsRequestChat,
86
86
  LogisticsRequestAttachment,
87
87
  LogisticsWorkFlow,
88
- ImportantLinks
88
+ ImportantLinks,
89
+ DelegateSettings
89
90
  ],
90
91
  });
package/src/index.ts CHANGED
@@ -34,3 +34,4 @@ export * from './models/LogisticsChatModel';
34
34
  export * from './models/LogisticsAttachmentModel';
35
35
  export * from './models/importantLinksModel';
36
36
  export * from './models/LogisticsWorkflowModel';
37
+ export * from './models/DelegateSettingsModel';
@@ -0,0 +1,37 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'delegate_settings' })
5
+ export class DelegateSettings extends BaseModel {
6
+
7
+ @Column({ type: 'int', nullable: false })
8
+ user_id: number;
9
+
10
+ @Column({ type: 'date', nullable: false })
11
+ from_date: Date;
12
+
13
+ @Column({ type: 'date', nullable: false })
14
+ to_date: Date;
15
+
16
+ @Column({ type: 'int', nullable: false })
17
+ delegate_to: number;
18
+
19
+ @Column({ type: 'boolean', default: true })
20
+ is_active: boolean;
21
+
22
+ constructor(
23
+ user_id: number,
24
+ from_date: Date,
25
+ to_date: Date,
26
+ delegate_to: number,
27
+ is_active: boolean = true
28
+ ) {
29
+ super();
30
+ this.user_id = user_id;
31
+ this.from_date = from_date;
32
+ this.to_date = to_date;
33
+ this.delegate_to = delegate_to;
34
+ this.is_active = is_active;
35
+ }
36
+ }
37
+
@@ -39,6 +39,12 @@ export class Notification extends BaseModel {
39
39
  @Column({ type: 'bigint', nullable: true })
40
40
  request_id: number;
41
41
 
42
+ @Column({ type: 'bigint', nullable: true })
43
+ service_id: number;
44
+
45
+ @Column({ type: 'bigint', nullable: true })
46
+ sub_service_id: number;
47
+
42
48
  @Column({ type: 'varchar', length: 500, nullable: true })
43
49
  route_path: string;
44
50
 
@@ -51,6 +57,8 @@ export class Notification extends BaseModel {
51
57
  content: any,
52
58
  is_read: boolean,
53
59
  request_id: number,
60
+ service_id: number,
61
+ sub_service_id: number,
54
62
  route_path: string
55
63
  ) {
56
64
  super();
@@ -62,6 +70,8 @@ export class Notification extends BaseModel {
62
70
  this.content = content;
63
71
  this.is_read = is_read;
64
72
  this.request_id = request_id;
73
+ this.service_id = service_id;
74
+ this.sub_service_id = sub_service_id;
65
75
  this.route_path = route_path;
66
76
  }
67
77
  }