@platform-modules/civil-aviation-authority 1.0.13 → 1.0.15
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 +2 -2
- package/dist/data-source.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/{ITServicesTypesModel.js → ITServicesTypesMuscatModel.js} +14 -9
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/user.js +5 -5
- package/package.json +1 -1
- package/src/data-source.ts +3 -2
- package/src/index.ts +2 -1
- package/src/models/ITServicesTypesMuscatModel.ts +22 -0
- package/src/models/ITServicesTypesSalalahModel.ts +22 -0
- package/src/models/user.ts +6 -10
- package/dist/models/ITServicesTypesModel.d.ts +0 -5
- package/src/models/ITServicesTypesModel.ts +0 -17
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -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
|
|
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,
|
|
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/
|
|
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/
|
|
21
|
+
__exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
|
|
22
|
+
__exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
|
|
@@ -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.
|
|
12
|
+
exports.ITServicesTypesMuscat = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
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.
|
|
22
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
24
25
|
__metadata("design:type", String)
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
(0, typeorm_1.
|
|
28
|
-
__metadata("design:
|
|
29
|
-
],
|
|
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,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/dist/models/user.js
CHANGED
|
@@ -49,11 +49,11 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
49
49
|
};
|
|
50
50
|
exports.User = User;
|
|
51
51
|
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
53
53
|
__metadata("design:type", Number)
|
|
54
54
|
], User.prototype, "employee_id", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
57
57
|
__metadata("design:type", Number)
|
|
58
58
|
], User.prototype, "civil_employee_id", void 0);
|
|
59
59
|
__decorate([
|
|
@@ -113,11 +113,11 @@ __decorate([
|
|
|
113
113
|
__metadata("design:type", String)
|
|
114
114
|
], User.prototype, "blood_type", void 0);
|
|
115
115
|
__decorate([
|
|
116
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
117
117
|
__metadata("design:type", Number)
|
|
118
118
|
], User.prototype, "national_id", void 0);
|
|
119
119
|
__decorate([
|
|
120
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
121
121
|
__metadata("design:type", Number)
|
|
122
122
|
], User.prototype, "manpower_id", void 0);
|
|
123
123
|
__decorate([
|
|
@@ -161,7 +161,7 @@ __decorate([
|
|
|
161
161
|
__metadata("design:type", String)
|
|
162
162
|
], User.prototype, "location", void 0);
|
|
163
163
|
__decorate([
|
|
164
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
164
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
165
165
|
__metadata("design:type", Number)
|
|
166
166
|
], User.prototype, "supervisor_emp_id", void 0);
|
|
167
167
|
__decorate([
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -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 {
|
|
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,
|
|
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/
|
|
5
|
+
export * from './models/ITServicesTypesSalalahModel';
|
|
6
|
+
export * from './models/ITServicesTypesMuscatModel';
|
|
6
7
|
|
|
@@ -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
|
+
}
|
package/src/models/user.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
1
|
import { Column, Entity } from "typeorm";
|
|
3
2
|
import { BaseModel } from './BaseModel';
|
|
4
3
|
|
|
5
4
|
@Entity({ name: 'users' })
|
|
6
5
|
export class User extends BaseModel {
|
|
7
6
|
|
|
8
|
-
@Column({ nullable: true })
|
|
7
|
+
@Column({ type: 'bigint', nullable: true })
|
|
9
8
|
employee_id?: number;
|
|
10
9
|
|
|
11
|
-
@Column({ nullable: true })
|
|
10
|
+
@Column({ type: 'bigint', nullable: true })
|
|
12
11
|
civil_employee_id?: number;
|
|
13
12
|
|
|
14
13
|
@Column({ nullable: true })
|
|
@@ -53,10 +52,10 @@ export class User extends BaseModel {
|
|
|
53
52
|
@Column({ nullable: true })
|
|
54
53
|
blood_type?: string;
|
|
55
54
|
|
|
56
|
-
@Column({ nullable: true })
|
|
55
|
+
@Column({ type: 'bigint', nullable: true })
|
|
57
56
|
national_id?: number;
|
|
58
57
|
|
|
59
|
-
@Column({ nullable: true })
|
|
58
|
+
@Column({ type: 'bigint', nullable: true })
|
|
60
59
|
manpower_id?: number;
|
|
61
60
|
|
|
62
61
|
@Column({ nullable: true })
|
|
@@ -89,13 +88,12 @@ export class User extends BaseModel {
|
|
|
89
88
|
@Column({ nullable: true })
|
|
90
89
|
location?: string;
|
|
91
90
|
|
|
92
|
-
@Column({ nullable: true })
|
|
91
|
+
@Column({ type: 'bigint', nullable: true })
|
|
93
92
|
supervisor_emp_id?: number;
|
|
94
93
|
|
|
95
94
|
@Column({ nullable: true })
|
|
96
95
|
supervisor_emp_name?: string;
|
|
97
96
|
|
|
98
|
-
|
|
99
97
|
constructor(
|
|
100
98
|
employee_id?: number,
|
|
101
99
|
civil_employee_id?: number,
|
|
@@ -160,6 +158,4 @@ export class User extends BaseModel {
|
|
|
160
158
|
this.supervisor_emp_id = supervisor_emp_id;
|
|
161
159
|
this.supervisor_emp_name = supervisor_emp_name;
|
|
162
160
|
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
}
|
|
@@ -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
|
-
}
|