@platform-modules/civil-aviation-authority 1.0.58 → 2.0.0

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.
@@ -0,0 +1,52 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { CAAServices } from './CAAServices';
4
+ import { CAASubServices } from './CAASubServices';
5
+
6
+ @Entity({ name: 'service_types' })
7
+ export class ServiceType extends BaseModel {
8
+
9
+ @Column({ nullable: false })
10
+ name: string;
11
+
12
+ @Column({ nullable: false })
13
+ name_in_arabic: string;
14
+
15
+ @Column({ nullable: false })
16
+ service_id: number;
17
+
18
+ @ManyToOne(() => CAAServices)
19
+ @JoinColumn({ name: 'service_id' })
20
+ service: CAAServices;
21
+
22
+ @Column({ nullable: false })
23
+ sub_service_id: number;
24
+
25
+ @ManyToOne(() => CAASubServices)
26
+ @JoinColumn({ name: 'sub_service_id' })
27
+ sub_service: CAASubServices;
28
+
29
+ @Column({ nullable: true })
30
+ description: string;
31
+
32
+ @Column({ type: 'boolean', default: true })
33
+ is_active: boolean;
34
+
35
+ constructor(
36
+ name: string,
37
+ name_in_arabic: string,
38
+ service_id: number,
39
+ sub_service_id: number,
40
+ description?: string,
41
+ is_active?: boolean
42
+ ) {
43
+ super();
44
+ this.name = name;
45
+ this.name_in_arabic = name_in_arabic;
46
+ this.service_id = service_id;
47
+ this.sub_service_id = sub_service_id;
48
+ this.description = description || '';
49
+ this.is_active = is_active !== undefined ? is_active : true;
50
+ }
51
+ }
52
+
@@ -1,5 +1,7 @@
1
- import { Column, Entity } from "typeorm";
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
+ import { CAAServices } from './CAAServices';
4
+ import { CAASubServices } from './CAASubServices';
3
5
 
4
6
  @Entity({ name: 'workflow_definitions' })
5
7
  export class WorkflowDefinitions extends BaseModel {
@@ -16,8 +18,28 @@ export class WorkflowDefinitions extends BaseModel {
16
18
  @Column({ type: 'boolean', default: true })
17
19
  is_active: boolean;
18
20
 
19
- @Column({ type: 'varchar', length: 50, nullable: true })
20
- service_type: string;
21
+ @Column({
22
+ type: 'varchar',
23
+ length: 20,
24
+ nullable: true,
25
+ enum: ['internal', 'external', 'none']
26
+ })
27
+ service_type: 'internal' | 'external' | 'none';
28
+
29
+ @Column({ type: 'bigint', nullable: false })
30
+ service_id: number;
31
+
32
+ @ManyToOne(() => CAAServices)
33
+ @JoinColumn({ name: 'service_id' })
34
+ service: CAAServices;
35
+
36
+ @Column({ type: 'bigint', nullable: false })
37
+ sub_service_id: number;
38
+
39
+ @ManyToOne(() => CAASubServices)
40
+ @JoinColumn({ name: 'sub_service_id' })
41
+ sub_service: CAASubServices;
42
+
21
43
 
22
44
  @Column({
23
45
  type: 'varchar',
@@ -31,15 +53,19 @@ export class WorkflowDefinitions extends BaseModel {
31
53
  description?: string,
32
54
  version?: number,
33
55
  is_active?: boolean,
34
- service_type?: string,
35
- status?: 'draft' | 'published'
56
+ service_id?: number,
57
+ sub_service_id?: number,
58
+ status?: 'draft' | 'published',
59
+ service_type?: 'internal' | 'external' | 'none'
36
60
  ) {
37
61
  super();
38
62
  this.name = name;
39
63
  this.description = description || '';
40
64
  this.version = version || 1;
41
65
  this.is_active = is_active !== undefined ? is_active : true;
42
- this.service_type = service_type || '';
66
+ this.service_id = service_id || 0;
67
+ this.sub_service_id = sub_service_id || 0;
43
68
  this.status = status || 'draft';
69
+ this.service_type = service_type || 'none';
44
70
  }
45
71
  }
@@ -16,7 +16,19 @@ export class WorkflowHierarchy extends BaseModel {
16
16
  section_id: number;
17
17
 
18
18
  @Column({ type: 'integer', nullable: true })
19
- approval_id: number;
19
+ approval_role_id: number;
20
+
21
+ @Column({ type: 'integer', nullable: true })
22
+ approval_user_id: number;
23
+
24
+ @Column({ type: 'varchar', length: 255, nullable: true })
25
+ taskname: string | null;
26
+
27
+ @Column({ type: 'varchar', length: 50, nullable: true })
28
+ status: string | null;
29
+
30
+ @Column({ type: 'jsonb', nullable: true })
31
+ task: any | null;
20
32
 
21
33
  @Column({ type: 'integer', nullable: false })
22
34
  step_order: number;
@@ -32,16 +44,24 @@ export class WorkflowHierarchy extends BaseModel {
32
44
  workflow_definition_id: number,
33
45
  department_id: number,
34
46
  section_id: number,
35
- approval_id: number,
47
+ approval_role_id: number,
48
+ approval_user_id: number,
36
49
  step_order: number,
37
- is_required?: boolean
50
+ is_required?: boolean,
51
+ taskname?: string,
52
+ status?: string,
53
+ task?: any
38
54
  ) {
39
55
  super();
40
56
  this.workflow_definition_id = workflow_definition_id;
41
57
  this.department_id = department_id;
42
58
  this.section_id = section_id;
43
- this.approval_id = approval_id;
59
+ this.approval_role_id = approval_role_id;
60
+ this.approval_user_id = approval_user_id;
44
61
  this.step_order = step_order;
45
62
  this.is_required = is_required !== undefined ? is_required : true;
63
+ this.taskname = taskname || null;
64
+ this.status = status || null;
65
+ this.task = task || null;
46
66
  }
47
67
  }
@@ -124,8 +124,6 @@ export class User extends BaseModel {
124
124
  @Column({ nullable: true })
125
125
  children2_name?: string;
126
126
 
127
- @Column({ nullable: true })
128
- address?: string;
129
127
 
130
128
  constructor(
131
129
  employee_id?: number,
@@ -166,8 +164,7 @@ export class User extends BaseModel {
166
164
  father_name?: string,
167
165
  spouse_name?: string,
168
166
  children1_name?: string,
169
- children2_name?: string,
170
- address?: string
167
+ children2_name?: string
171
168
  ) {
172
169
  super();
173
170
  this.employee_id = employee_id;
@@ -209,6 +206,5 @@ export class User extends BaseModel {
209
206
  this.spouse_name = spouse_name;
210
207
  this.children1_name = children1_name;
211
208
  this.children2_name = children2_name;
212
- this.address = address;
213
209
  }
214
210
  }
@@ -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,29 +0,0 @@
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.ITServicesTypes = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let ITServicesTypes = class ITServicesTypes extends BaseModel_1.BaseModel {
16
- constructor(name) {
17
- super();
18
- this.name = name;
19
- }
20
- };
21
- exports.ITServicesTypes = ITServicesTypes;
22
- __decorate([
23
- (0, typeorm_1.Column)({ nullable: false }),
24
- __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);