@platform-modules/civil-aviation-authority 1.0.21 → 1.0.22
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/dist/data-source.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/ITApprovalSettings.d.ts +9 -0
- package/dist/models/ITApprovalSettings.js +50 -0
- package/package.json +1 -1
- package/src/data-source.ts +2 -1
- package/src/index.ts +1 -0
- package/src/models/ITApprovalSettings.ts +39 -0
package/dist/data-source.js
CHANGED
|
@@ -13,6 +13,7 @@ const ITServicesTypesSalalahModel_1 = require("./models/ITServicesTypesSalalahMo
|
|
|
13
13
|
const ITServicesTypesMuscatModel_1 = require("./models/ITServicesTypesMuscatModel");
|
|
14
14
|
const CAAServices_1 = require("./models/CAAServices");
|
|
15
15
|
const CAASubServices_1 = require("./models/CAASubServices");
|
|
16
|
+
const ITApprovalSettings_1 = require("./models/ITApprovalSettings");
|
|
16
17
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
17
18
|
type: 'postgres',
|
|
18
19
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -22,5 +23,5 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
22
23
|
database: process.env.DB_NAME || 'common_models',
|
|
23
24
|
synchronize: true, // auto-create tables (disable in prod)
|
|
24
25
|
logging: false,
|
|
25
|
-
entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, ITHelpDeskModel_1.ITHelpDeskRequests, ITServicesTypesSalalahModel_1.ITServicesTypesSalalah, ITServicesTypesMuscatModel_1.ITServicesTypesMuscat, CAAServices_1.CAAServices, CAASubServices_1.CAASubServices],
|
|
26
|
+
entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, ITHelpDeskModel_1.ITHelpDeskRequests, ITServicesTypesSalalahModel_1.ITServicesTypesSalalah, ITServicesTypesMuscatModel_1.ITServicesTypesMuscat, CAAServices_1.CAAServices, CAASubServices_1.CAASubServices, ITApprovalSettings_1.ITApprovalSettings],
|
|
26
27
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,3 +22,4 @@ __exportStar(require("./models/ITServicesTypesSalalahModel"), exports);
|
|
|
22
22
|
__exportStar(require("./models/ITServicesTypesMuscatModel"), exports);
|
|
23
23
|
__exportStar(require("./models/CAAServices"), exports);
|
|
24
24
|
__exportStar(require("./models/CAASubServices"), exports);
|
|
25
|
+
__exportStar(require("./models/ITApprovalSettings"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class ITApprovalSettings extends BaseModel {
|
|
3
|
+
service_id: number;
|
|
4
|
+
sub_service_id: number;
|
|
5
|
+
request_for: string;
|
|
6
|
+
level: number;
|
|
7
|
+
approval_role_id: number;
|
|
8
|
+
constructor(service_id: number, sub_service_id: number, request_for: string, level: number, approval_role_id: number);
|
|
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.ITApprovalSettings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(service_id, sub_service_id, request_for, level, approval_role_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.service_id = service_id;
|
|
19
|
+
this.sub_service_id = sub_service_id;
|
|
20
|
+
this.request_for = request_for;
|
|
21
|
+
this.level = level;
|
|
22
|
+
this.approval_role_id = approval_role_id;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.ITApprovalSettings = ITApprovalSettings;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], ITApprovalSettings.prototype, "service_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], ITApprovalSettings.prototype, "sub_service_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16, nullable: false }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ITApprovalSettings.prototype, "request_for", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], ITApprovalSettings.prototype, "level", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ITApprovalSettings.prototype, "approval_role_id", void 0);
|
|
46
|
+
exports.ITApprovalSettings = ITApprovalSettings = __decorate([
|
|
47
|
+
(0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
|
|
48
|
+
(0, typeorm_1.Unique)(['service_id', 'sub_service_id', 'request_for']),
|
|
49
|
+
__metadata("design:paramtypes", [Number, Number, String, Number, Number])
|
|
50
|
+
], ITApprovalSettings);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ITServicesTypesSalalah } from './models/ITServicesTypesSalalahModel';
|
|
|
10
10
|
import { ITServicesTypesMuscat } from './models/ITServicesTypesMuscatModel';
|
|
11
11
|
import { CAAServices } from './models/CAAServices';
|
|
12
12
|
import { CAASubServices } from './models/CAASubServices';
|
|
13
|
+
import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
13
14
|
export const AppDataSource = new DataSource({
|
|
14
15
|
type: 'postgres',
|
|
15
16
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -19,5 +20,5 @@ export const AppDataSource = new 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,userSessions,Role, ITHelpDeskRequests, ITServicesTypesSalalah, ITServicesTypesMuscat, CAAServices, CAASubServices],
|
|
23
|
+
entities: [User,userSessions,Role, ITHelpDeskRequests, ITServicesTypesSalalah, ITServicesTypesMuscat, CAAServices, CAASubServices, ITApprovalSettings],
|
|
23
24
|
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity, Unique } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'it_approval_settings' })
|
|
5
|
+
@Unique(['service_id', 'sub_service_id', 'request_for'])
|
|
6
|
+
export class ITApprovalSettings extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'bigint', nullable: false })
|
|
9
|
+
service_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'bigint', nullable: false })
|
|
12
|
+
sub_service_id: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'varchar', length: 16, nullable: false })
|
|
15
|
+
request_for: string; // 'Self' | 'Behalf of' | 'Internal'
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int', nullable: false })
|
|
18
|
+
level: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: false })
|
|
21
|
+
approval_role_id: number;
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
service_id: number,
|
|
25
|
+
sub_service_id: number,
|
|
26
|
+
request_for: string,
|
|
27
|
+
level: number,
|
|
28
|
+
approval_role_id: number
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.service_id = service_id;
|
|
32
|
+
this.sub_service_id = sub_service_id;
|
|
33
|
+
this.request_for = request_for;
|
|
34
|
+
this.level = level;
|
|
35
|
+
this.approval_role_id = approval_role_id;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|