@platform-modules/civil-aviation-authority 1.0.28 → 1.0.30
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 +3 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/models/DepartmentsModel.d.ts +7 -0
- package/dist/models/DepartmentsModel.js +39 -0
- package/dist/models/DirectorateModel.d.ts +7 -0
- package/dist/models/DirectorateModel.js +39 -0
- package/dist/models/SectionModel.d.ts +8 -0
- package/dist/models/SectionModel.js +44 -0
- package/package.json +1 -1
- package/src/data-source.ts +3 -0
- package/src/index.ts +3 -0
- package/src/models/DepartmentsModel.ts +26 -0
- package/src/models/DirectorateModel.ts +20 -0
- package/src/models/SectionModel.ts +31 -0
package/.env
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,3 +10,6 @@ export * from './models/ITApprovalSettings';
|
|
|
10
10
|
export * from './models/Workflows';
|
|
11
11
|
export * from './models/ItApprovalsModel';
|
|
12
12
|
export * from './models/ItWorkflowModel';
|
|
13
|
+
export * from './models/DepartmentsModel';
|
|
14
|
+
export * from './models/DirectorateModel';
|
|
15
|
+
export * from './models/SectionModel';
|
package/dist/index.js
CHANGED
|
@@ -26,3 +26,6 @@ __exportStar(require("./models/ITApprovalSettings"), exports);
|
|
|
26
26
|
__exportStar(require("./models/Workflows"), exports);
|
|
27
27
|
__exportStar(require("./models/ItApprovalsModel"), exports);
|
|
28
28
|
__exportStar(require("./models/ItWorkflowModel"), exports);
|
|
29
|
+
__exportStar(require("./models/DepartmentsModel"), exports);
|
|
30
|
+
__exportStar(require("./models/DirectorateModel"), exports);
|
|
31
|
+
__exportStar(require("./models/SectionModel"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Departments extends BaseModel {
|
|
3
|
+
department_name: string;
|
|
4
|
+
department_code: string;
|
|
5
|
+
department_description: string;
|
|
6
|
+
constructor(department_name: string, department_code: string, department_description: 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.Departments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Departments = class Departments extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(department_name, department_code, department_description) {
|
|
17
|
+
super();
|
|
18
|
+
this.department_name = department_name;
|
|
19
|
+
this.department_code = department_code;
|
|
20
|
+
this.department_description = department_description;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.Departments = Departments;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Departments.prototype, "department_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Departments.prototype, "department_code", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Departments.prototype, "department_description", void 0);
|
|
36
|
+
exports.Departments = Departments = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'departments' }),
|
|
38
|
+
__metadata("design:paramtypes", [String, String, String])
|
|
39
|
+
], Departments);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Directorate extends BaseModel {
|
|
3
|
+
directorate_code: string;
|
|
4
|
+
directorate_name: string;
|
|
5
|
+
directorate_description: string;
|
|
6
|
+
constructor(directorate_code: string, directorate_name: string, directorate_description: 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.Directorate = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Directorate = class Directorate extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(directorate_code, directorate_name, directorate_description) {
|
|
17
|
+
super();
|
|
18
|
+
this.directorate_code = directorate_code;
|
|
19
|
+
this.directorate_name = directorate_name;
|
|
20
|
+
this.directorate_description = directorate_description;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.Directorate = Directorate;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Directorate.prototype, "directorate_code", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Directorate.prototype, "directorate_name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Directorate.prototype, "directorate_description", void 0);
|
|
36
|
+
exports.Directorate = Directorate = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'directorates' }),
|
|
38
|
+
__metadata("design:paramtypes", [String, String, String])
|
|
39
|
+
], Directorate);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class UserSections extends BaseModel {
|
|
3
|
+
section_name: string;
|
|
4
|
+
section_code: string;
|
|
5
|
+
section_description: string;
|
|
6
|
+
department_id: number;
|
|
7
|
+
constructor(section_name: string, section_code: string, section_description: string, department_id: number);
|
|
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.UserSections = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let UserSections = class UserSections extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(section_name, section_code, section_description, department_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.section_name = section_name;
|
|
19
|
+
this.section_code = section_code;
|
|
20
|
+
this.section_description = section_description;
|
|
21
|
+
this.department_id = department_id;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.UserSections = UserSections;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserSections.prototype, "section_name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UserSections.prototype, "section_code", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserSections.prototype, "section_description", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], UserSections.prototype, "department_id", void 0);
|
|
41
|
+
exports.UserSections = UserSections = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'user_sections' }),
|
|
43
|
+
__metadata("design:paramtypes", [String, String, String, Number])
|
|
44
|
+
], UserSections);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -14,6 +14,9 @@ import { ITApprovalSettings } from './models/ITApprovalSettings';
|
|
|
14
14
|
import { Workflows } from './models/Workflows';
|
|
15
15
|
import { ItApprovalDetails } from './models/ItApprovalsModel';
|
|
16
16
|
import { ItWorkFlow } from './models/ItWorkflowModel';
|
|
17
|
+
import { Departments } from './models/DepartmentsModel';
|
|
18
|
+
import { Directorate } from './models/DirectorateModel';
|
|
19
|
+
import { UserSections } from './models/SectionModel';
|
|
17
20
|
export const AppDataSource = new DataSource({
|
|
18
21
|
type: 'postgres',
|
|
19
22
|
host: process.env.DB_HOST || 'localhost',
|
package/src/index.ts
CHANGED
|
@@ -10,3 +10,6 @@ export * from './models/ITApprovalSettings';
|
|
|
10
10
|
export * from './models/Workflows';
|
|
11
11
|
export * from './models/ItApprovalsModel';
|
|
12
12
|
export * from './models/ItWorkflowModel';
|
|
13
|
+
export * from './models/DepartmentsModel';
|
|
14
|
+
export * from './models/DirectorateModel';
|
|
15
|
+
export * from './models/SectionModel';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'departments' })
|
|
5
|
+
export class Departments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
8
|
+
department_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
11
|
+
department_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
department_description: string;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
department_name: string,
|
|
18
|
+
department_code: string,
|
|
19
|
+
department_description: string,
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
this.department_name = department_name
|
|
23
|
+
this.department_code = department_code
|
|
24
|
+
this.department_description = department_description
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
@Entity({ name: 'directorates' })
|
|
4
|
+
export class Directorate extends BaseModel {
|
|
5
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
6
|
+
directorate_code: string;
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
9
|
+
directorate_name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
12
|
+
directorate_description: string;
|
|
13
|
+
|
|
14
|
+
constructor(directorate_code: string, directorate_name: string, directorate_description: string) {
|
|
15
|
+
super();
|
|
16
|
+
this.directorate_code = directorate_code;
|
|
17
|
+
this.directorate_name = directorate_name;
|
|
18
|
+
this.directorate_description = directorate_description;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'user_sections' })
|
|
5
|
+
export class UserSections extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
8
|
+
section_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
11
|
+
section_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
section_description: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'bigint', nullable: true })
|
|
17
|
+
department_id: number;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
section_name: string,
|
|
21
|
+
section_code: string,
|
|
22
|
+
section_description: string,
|
|
23
|
+
department_id: number
|
|
24
|
+
) {
|
|
25
|
+
super();
|
|
26
|
+
this.section_name = section_name
|
|
27
|
+
this.section_code = section_code
|
|
28
|
+
this.section_description = section_description
|
|
29
|
+
this.department_id = department_id
|
|
30
|
+
}
|
|
31
|
+
}
|