@platform-modules/civil-aviation-authority 1.0.14 → 1.0.16

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=5433
3
- DB_USER=postgres
4
- DB_PASS=123
3
+ DB_USER=netflix_user
4
+ DB_PASS=netflix_user
5
5
  DB_NAME=CAA
@@ -9,7 +9,8 @@ const user_1 = require("./models/user"); // import all entities here
9
9
  const user_sessions_1 = require("./models/user-sessions");
10
10
  const role_1 = require("./models/role");
11
11
  const ITHelpDeskModel_1 = require("./models/ITHelpDeskModel");
12
- const ITServicesTypesModel_1 = require("./models/ITServicesTypesModel");
12
+ const ITServicesTypesSalalahModel_1 = require("./models/ITServicesTypesSalalahModel");
13
+ const ITServicesTypesMuscatModel_1 = require("./models/ITServicesTypesMuscatModel");
13
14
  exports.AppDataSource = new typeorm_1.DataSource({
14
15
  type: 'postgres',
15
16
  host: process.env.DB_HOST || 'localhost',
@@ -19,5 +20,5 @@ exports.AppDataSource = new typeorm_1.DataSource({
19
20
  database: process.env.DB_NAME || 'common_models',
20
21
  synchronize: true, // auto-create tables (disable in prod)
21
22
  logging: false,
22
- entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, ITHelpDeskModel_1.ITHelpDeskRequests, ITServicesTypesModel_1.ITServicesTypes],
23
+ entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, ITHelpDeskModel_1.ITHelpDeskRequests, ITServicesTypesSalalahModel_1.ITServicesTypesSalalah, ITServicesTypesMuscatModel_1.ITServicesTypesMuscat],
23
24
  });
package/dist/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from './models/user';
2
2
  export * from './models/role';
3
3
  export * from './models/user-sessions';
4
4
  export * from './models/ITHelpDeskModel';
5
- export * from './models/ITServicesTypesModel';
5
+ export * from './models/ITServicesTypesSalalahModel';
6
+ export * from './models/ITServicesTypesMuscatModel';
package/dist/index.js CHANGED
@@ -18,4 +18,5 @@ __exportStar(require("./models/user"), exports);
18
18
  __exportStar(require("./models/role"), exports);
19
19
  __exportStar(require("./models/user-sessions"), exports);
20
20
  __exportStar(require("./models/ITHelpDeskModel"), exports);
21
- __exportStar(require("./models/ITServicesTypesModel"), exports);
21
+ __exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
22
+ __exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class CAAServices extends BaseModel {
3
+ name: string;
4
+ description: string;
5
+ logo_url: string;
6
+ constructor(name: string, description: string, logo_url: string);
7
+ }
@@ -0,0 +1,39 @@
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.CAAServices = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let CAAServices = class CAAServices extends BaseModel_1.BaseModel {
16
+ constructor(name, description, logo_url) {
17
+ super();
18
+ this.name = name;
19
+ this.description = description;
20
+ this.logo_url = logo_url;
21
+ }
22
+ };
23
+ exports.CAAServices = CAAServices;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ nullable: false }),
26
+ __metadata("design:type", String)
27
+ ], CAAServices.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ nullable: false }),
30
+ __metadata("design:type", String)
31
+ ], CAAServices.prototype, "description", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ nullable: false }),
34
+ __metadata("design:type", String)
35
+ ], CAAServices.prototype, "logo_url", void 0);
36
+ exports.CAAServices = CAAServices = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'caa_services' }),
38
+ __metadata("design:paramtypes", [String, String, String])
39
+ ], CAAServices);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class CAASubServices extends BaseModel {
3
+ sub_service_name: string;
4
+ description: string;
5
+ service_id: number;
6
+ logo_url: string;
7
+ constructor(sub_service_name: string, description: string, service_id: number, logo_url: string);
8
+ }
@@ -0,0 +1,44 @@
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.CAASubServices = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let CAASubServices = class CAASubServices extends BaseModel_1.BaseModel {
16
+ constructor(sub_service_name, description, service_id, logo_url) {
17
+ super();
18
+ this.sub_service_name = sub_service_name;
19
+ this.description = description;
20
+ this.service_id = service_id;
21
+ this.logo_url = logo_url;
22
+ }
23
+ };
24
+ exports.CAASubServices = CAASubServices;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ nullable: false }),
27
+ __metadata("design:type", String)
28
+ ], CAASubServices.prototype, "sub_service_name", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ nullable: false }),
31
+ __metadata("design:type", String)
32
+ ], CAASubServices.prototype, "description", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ nullable: true }),
35
+ __metadata("design:type", Number)
36
+ ], CAASubServices.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], CAASubServices.prototype, "logo_url", void 0);
41
+ exports.CAASubServices = CAASubServices = __decorate([
42
+ (0, typeorm_1.Entity)({ name: 'caa_services' }),
43
+ __metadata("design:paramtypes", [String, String, Number, String])
44
+ ], CAASubServices);
@@ -0,0 +1,6 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITServicesTypesMuscat extends BaseModel {
3
+ name: string;
4
+ name_in_arabic: string;
5
+ constructor(name: string, name_in_arabic: string);
6
+ }
@@ -9,21 +9,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ITServicesTypes = void 0;
12
+ exports.ITServicesTypesMuscat = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- let ITServicesTypes = class ITServicesTypes extends BaseModel_1.BaseModel {
16
- constructor(name) {
15
+ let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
16
+ constructor(name, name_in_arabic) {
17
17
  super();
18
18
  this.name = name;
19
+ this.name_in_arabic = name_in_arabic;
19
20
  }
20
21
  };
21
- exports.ITServicesTypes = ITServicesTypes;
22
+ exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
22
23
  __decorate([
23
24
  (0, typeorm_1.Column)({ nullable: false }),
24
25
  __metadata("design:type", String)
25
- ], ITServicesTypes.prototype, "name", void 0);
26
- exports.ITServicesTypes = ITServicesTypes = __decorate([
27
- (0, typeorm_1.Entity)({ name: 'IT_Services_Types' }),
28
- __metadata("design:paramtypes", [String])
29
- ], ITServicesTypes);
26
+ ], ITServicesTypesMuscat.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ nullable: false }),
29
+ __metadata("design:type", String)
30
+ ], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
31
+ exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
32
+ (0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
33
+ __metadata("design:paramtypes", [String, String])
34
+ ], ITServicesTypesMuscat);
@@ -0,0 +1,6 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class ITServicesTypesSalalah extends BaseModel {
3
+ name: string;
4
+ name_in_arabic: string;
5
+ constructor(name: string, name_in_arabic: string);
6
+ }
@@ -0,0 +1,34 @@
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.ITServicesTypesSalalah = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
16
+ constructor(name, name_in_arabic) {
17
+ super();
18
+ this.name = name;
19
+ this.name_in_arabic = name_in_arabic;
20
+ }
21
+ };
22
+ exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ nullable: false }),
25
+ __metadata("design:type", String)
26
+ ], ITServicesTypesSalalah.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ nullable: false }),
29
+ __metadata("design:type", String)
30
+ ], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
31
+ exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
32
+ (0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
33
+ __metadata("design:paramtypes", [String, String])
34
+ ], ITServicesTypesSalalah);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -6,7 +6,8 @@ import { User } from './models/user'; // import all entities here
6
6
  import { userSessions } from './models/user-sessions';
7
7
  import { Role } from './models/role';
8
8
  import { ITHelpDeskRequests } from './models/ITHelpDeskModel';
9
- import { ITServicesTypes } from './models/ITServicesTypesModel';
9
+ import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
10
+ import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
10
11
 
11
12
  export const AppDataSource = new DataSource({
12
13
  type: 'postgres',
@@ -17,5 +18,5 @@ export const AppDataSource = new DataSource({
17
18
  database: process.env.DB_NAME || 'common_models',
18
19
  synchronize: true, // auto-create tables (disable in prod)
19
20
  logging: false,
20
- entities: [User,userSessions,Role, ITHelpDeskRequests, ITServicesTypes],
21
+ entities: [User,userSessions,Role, ITHelpDeskRequests, ITServicesTypesSalalah, ITServicesTypesMuscat],
21
22
  });
package/src/index.ts CHANGED
@@ -2,5 +2,6 @@ export * from './models/user';
2
2
  export * from './models/role';
3
3
  export * from './models/user-sessions';
4
4
  export * from './models/ITHelpDeskModel';
5
- export * from './models/ITServicesTypesModel';
5
+ export * from './models/ITServicesTypesSalalahModel';
6
+ export * from './models/ITServicesTypesMuscatModel';
6
7
 
@@ -0,0 +1,27 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'caa_services' })
6
+ export class CAAServices extends BaseModel {
7
+
8
+ @Column({ nullable: false })
9
+ name: string;
10
+
11
+ @Column({ nullable: false })
12
+ description: string;
13
+
14
+ @Column({ nullable: false })
15
+ logo_url: string;
16
+
17
+ constructor(
18
+ name: string,
19
+ description: string,
20
+ logo_url: string
21
+ ) {
22
+ super();
23
+ this.name = name
24
+ this.description = description
25
+ this.logo_url = logo_url
26
+ }
27
+ }
@@ -0,0 +1,32 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'caa_services' })
6
+ export class CAASubServices extends BaseModel {
7
+
8
+ @Column({ nullable: false })
9
+ sub_service_name: string;
10
+
11
+ @Column({ nullable: false })
12
+ description: string;
13
+
14
+ @Column({ nullable: true })
15
+ service_id: number;
16
+
17
+ @Column({ nullable: true })
18
+ logo_url: string;
19
+
20
+ constructor(
21
+ sub_service_name: string,
22
+ description: string,
23
+ service_id: number,
24
+ logo_url: string
25
+ ) {
26
+ super();
27
+ this.sub_service_name = sub_service_name
28
+ this.description = description
29
+ this.service_id = service_id
30
+ this.logo_url = logo_url
31
+ }
32
+ }
@@ -0,0 +1,22 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'it_services_types_muscat' })
6
+ export class ITServicesTypesMuscat extends BaseModel {
7
+
8
+ @Column({ nullable: false })
9
+ name: string;
10
+
11
+ @Column({ nullable: false })
12
+ name_in_arabic: string;
13
+
14
+ constructor(
15
+ name: string,
16
+ name_in_arabic: string
17
+ ) {
18
+ super();
19
+ this.name = name
20
+ this.name_in_arabic = name_in_arabic
21
+ }
22
+ }
@@ -0,0 +1,22 @@
1
+
2
+ import { Column, Entity } from "typeorm";
3
+ import { BaseModel } from './BaseModel';
4
+
5
+ @Entity({ name: 'it_services_types_salalah' })
6
+ export class ITServicesTypesSalalah extends BaseModel {
7
+
8
+ @Column({ nullable: false })
9
+ name: string;
10
+
11
+ @Column({ nullable: false })
12
+ name_in_arabic: string;
13
+
14
+ constructor(
15
+ name: string,
16
+ name_in_arabic: string
17
+ ) {
18
+ super();
19
+ this.name = name
20
+ this.name_in_arabic = name_in_arabic
21
+ }
22
+ }
@@ -1,5 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ITServicesTypes extends BaseModel {
3
- name: string;
4
- constructor(name: string);
5
- }
@@ -1,17 +0,0 @@
1
-
2
- import { Column, Entity } from "typeorm";
3
- import { BaseModel } from './BaseModel';
4
-
5
- @Entity({ name: 'IT_Services_Types' })
6
- export class ITServicesTypes extends BaseModel {
7
-
8
- @Column({ nullable: false })
9
- name: string;
10
-
11
- constructor(
12
- name: string
13
- ) {
14
- super();
15
- this.name = name
16
- }
17
- }