@platform-modules/foreign-ministry 1.1.23 → 1.1.24
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 -11
- package/dist/data-source.js +28 -8
- package/dist/index.d.ts +14 -4
- package/dist/index.js +14 -4
- package/dist/models/AttendanceModel.d.ts +1 -2
- package/dist/models/AttendanceModel.js +1 -2
- package/dist/models/DiplomaticClubCardApprovalModel.d.ts +16 -0
- package/dist/models/DiplomaticClubCardApprovalModel.js +58 -0
- package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +9 -0
- package/dist/models/DiplomaticClubCardAttachmentModel.js +44 -0
- package/dist/models/DiplomaticClubCardChatModel.d.ts +7 -0
- package/dist/models/{HelpContentMappedCategoriesModel.js → DiplomaticClubCardChatModel.js} +18 -16
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +13 -0
- package/dist/models/DiplomaticClubCardMemberModel.js +60 -0
- package/dist/models/DiplomaticClubCardRequestModel.d.ts +33 -0
- package/dist/models/DiplomaticClubCardRequestModel.js +98 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +12 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.js +42 -0
- package/dist/models/DiplomaticTitleModel.d.ts +12 -0
- package/dist/models/DiplomaticTitleModel.js +45 -0
- package/dist/models/LeaveApprovalsModel.d.ts +1 -4
- package/dist/models/LeaveApprovalsModel.js +0 -9
- package/dist/models/PassportRequestApprovalModel.d.ts +22 -0
- package/dist/models/PassportRequestApprovalModel.js +91 -0
- package/dist/models/PassportRequestAttachmentModel.d.ts +10 -0
- package/dist/models/PassportRequestAttachmentModel.js +54 -0
- package/dist/models/PassportRequestChatModel.d.ts +8 -0
- package/dist/models/PassportRequestChatModel.js +44 -0
- package/dist/models/PassportRequestDependentModel.d.ts +20 -0
- package/dist/models/PassportRequestDependentModel.js +85 -0
- package/dist/models/PassportRequestModel.d.ts +40 -0
- package/dist/models/PassportRequestModel.js +128 -0
- package/dist/models/PassportRequestWorkFlowModel.d.ts +15 -0
- package/dist/models/PassportRequestWorkFlowModel.js +60 -0
- package/dist/models/SubscriptionAmountModel.d.ts +10 -0
- package/dist/models/SubscriptionAmountModel.js +45 -0
- package/dist/models/WorkflowTask.d.ts +2 -5
- package/dist/models/WorkflowTask.js +4 -28
- package/dist/models/WorkflowTaskNames.d.ts +3 -12
- package/dist/models/WorkflowTaskNames.js +9 -28
- package/package.json +1 -1
- package/src/data-source.ts +28 -8
- package/src/index.ts +14 -4
- package/src/models/AttendanceModel.ts +1 -2
- package/src/models/DiplomaticClubCardApprovalModel.ts +37 -0
- package/src/models/DiplomaticClubCardAttachmentModel.ts +25 -0
- package/src/models/DiplomaticClubCardChatModel.ts +19 -0
- package/src/models/DiplomaticClubCardMemberModel.ts +37 -0
- package/src/models/DiplomaticClubCardRequestModel.ts +70 -0
- package/src/models/DiplomaticClubCardWorkFlowModel.ts +25 -0
- package/src/models/DiplomaticTitleModel.ts +27 -0
- package/src/models/LeaveApprovalsModel.ts +1 -8
- package/src/models/PassportRequestApprovalModel.ts +79 -0
- package/src/models/PassportRequestAttachmentModel.ts +42 -0
- package/src/models/PassportRequestChatModel.ts +27 -0
- package/src/models/PassportRequestDependentModel.ts +73 -0
- package/src/models/PassportRequestModel.ts +116 -0
- package/src/models/PassportRequestWorkFlowModel.ts +48 -0
- package/src/models/SubscriptionAmountModel.ts +26 -0
- package/src/models/WorkflowTask.ts +4 -31
- package/src/models/WorkflowTaskNames.ts +8 -27
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.js +0 -34
- package/dist/models/HelpContentTagsModel.d.ts +0 -5
- package/dist/models/HelpContentTagsModel.js +0 -29
- package/dist/models/UpdateAttendanceApprovalModel.d.ts +0 -21
- package/dist/models/UpdateAttendanceApprovalModel.js +0 -75
- package/dist/models/UpdateAttendanceChatModel.d.ts +0 -16
- package/dist/models/UpdateAttendanceChatModel.js +0 -52
- package/dist/models/UpdateAttendanceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendanceRequestModel.js +0 -86
- package/dist/models/UpdateAttendanceWorkflowModel.d.ts +0 -13
- package/dist/models/UpdateAttendanceWorkflowModel.js +0 -46
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/dist/models/questionTagsModel.js +0 -34
- package/src/models/UpdateAttendanceApprovalModel.ts +0 -50
- package/src/models/UpdateAttendanceChatModel.ts +0 -34
- package/src/models/UpdateAttendanceRequestModel.ts +0 -62
- package/src/models/UpdateAttendanceWorkflowModel.ts +0 -28
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum PassportRequestApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
IN_PROGRESS = "In Progress"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'passport_request_approvals' })
|
|
12
|
+
export class PassportRequestApprovals extends BaseModel {
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'int', nullable: false })
|
|
15
|
+
request_id: number; // Reference to passport_requests
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int', nullable: true })
|
|
18
|
+
approver_user_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
approver_role_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
24
|
+
level: number; // Approval level/step order
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
department_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
section_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
delegate_user_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
36
|
+
approved_by: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'text', nullable: true })
|
|
39
|
+
comment: string | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'enum', enum: PassportRequestApprovalStatus, default: PassportRequestApprovalStatus.PENDING, nullable: false })
|
|
42
|
+
approval_status: PassportRequestApprovalStatus;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
service_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'int', nullable: true })
|
|
48
|
+
sub_service_id: number | null;
|
|
49
|
+
|
|
50
|
+
constructor(
|
|
51
|
+
request_id: number,
|
|
52
|
+
level: number,
|
|
53
|
+
approver_user_id?: number | null,
|
|
54
|
+
approver_role_id?: number | null,
|
|
55
|
+
department_id?: number | null,
|
|
56
|
+
section_id?: number | null,
|
|
57
|
+
delegate_user_id?: number | null,
|
|
58
|
+
approved_by?: string | null,
|
|
59
|
+
comment?: string | null,
|
|
60
|
+
approval_status?: PassportRequestApprovalStatus,
|
|
61
|
+
service_id?: number | null,
|
|
62
|
+
sub_service_id?: number | null
|
|
63
|
+
) {
|
|
64
|
+
super();
|
|
65
|
+
this.request_id = request_id;
|
|
66
|
+
this.approver_user_id = approver_user_id || null;
|
|
67
|
+
this.approver_role_id = approver_role_id || null;
|
|
68
|
+
this.level = level;
|
|
69
|
+
this.department_id = department_id || null;
|
|
70
|
+
this.section_id = section_id || null;
|
|
71
|
+
this.delegate_user_id = delegate_user_id || null;
|
|
72
|
+
this.approved_by = approved_by || null;
|
|
73
|
+
this.comment = comment || null;
|
|
74
|
+
this.approval_status = approval_status || PassportRequestApprovalStatus.PENDING;
|
|
75
|
+
this.service_id = service_id || null;
|
|
76
|
+
this.sub_service_id = sub_service_id || null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'passport_request_attachments' })
|
|
5
|
+
export class PassportRequestAttachments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'int', nullable: false })
|
|
8
|
+
request_id: number; // Reference to passport_requests
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'int', nullable: true })
|
|
11
|
+
dependent_id: number | null; // Reference to passport_request_dependents (if applicable)
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
14
|
+
file_name: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_path: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
20
|
+
file_type: string | null; // image/jpeg, image/png, pdf, etc.
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
23
|
+
attachment_type: string | null; // document, photo, etc.
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
request_id: number,
|
|
27
|
+
file_name: string,
|
|
28
|
+
file_path: string,
|
|
29
|
+
dependent_id?: number | null,
|
|
30
|
+
file_type?: string | null,
|
|
31
|
+
attachment_type?: string | null
|
|
32
|
+
) {
|
|
33
|
+
super();
|
|
34
|
+
this.request_id = request_id;
|
|
35
|
+
this.dependent_id = dependent_id || null;
|
|
36
|
+
this.file_name = file_name;
|
|
37
|
+
this.file_path = file_path;
|
|
38
|
+
this.file_type = file_type || null;
|
|
39
|
+
this.attachment_type = attachment_type || null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'passport_request_chats' })
|
|
5
|
+
export class PassportRequestChat extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'int', nullable: false })
|
|
8
|
+
request_id: number; // Reference to passport_requests
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'int', nullable: false })
|
|
11
|
+
user_id: number; // User who sent the message
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'text', nullable: false })
|
|
14
|
+
message: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
17
|
+
message_type: string | null; // text, file, etc.
|
|
18
|
+
|
|
19
|
+
constructor(request_id: number, user_id: number, message: string, message_type?: string | null) {
|
|
20
|
+
super();
|
|
21
|
+
this.request_id = request_id;
|
|
22
|
+
this.user_id = user_id;
|
|
23
|
+
this.message = message;
|
|
24
|
+
this.message_type = message_type || null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DependentRelation {
|
|
5
|
+
SELF = "Self",
|
|
6
|
+
SPOUSE = "Spouse",
|
|
7
|
+
CHILD = "Child"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'passport_request_dependents' })
|
|
11
|
+
export class PassportRequestDependents extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number; // Reference to passport_requests
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
17
|
+
first_name: string; // Mandatory
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
20
|
+
family_name: string; // Mandatory - القبيلة / العائلة
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
23
|
+
last_name: string; // Mandatory
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
26
|
+
gender: string; // Mandatory - الجنس
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
29
|
+
nationality: string; // Mandatory - الجنسية
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
32
|
+
place_of_birth: string; // Mandatory - تاريخ الميلاد
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
35
|
+
job_occupation: string; // Mandatory - جهة العمل
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'enum', enum: DependentRelation, nullable: false })
|
|
38
|
+
relation: DependentRelation; // Self / Spouse / Child
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'int', nullable: false })
|
|
41
|
+
age: number; // Mandatory
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
44
|
+
passport_request_type: string; // Mandatory - نوع الطلب للجواز (New/Renew/Lost/Stolen)
|
|
45
|
+
|
|
46
|
+
constructor(
|
|
47
|
+
request_id: number,
|
|
48
|
+
first_name: string,
|
|
49
|
+
family_name: string,
|
|
50
|
+
last_name: string,
|
|
51
|
+
gender: string,
|
|
52
|
+
nationality: string,
|
|
53
|
+
place_of_birth: string,
|
|
54
|
+
job_occupation: string,
|
|
55
|
+
relation: DependentRelation,
|
|
56
|
+
age: number,
|
|
57
|
+
passport_request_type: string
|
|
58
|
+
) {
|
|
59
|
+
super();
|
|
60
|
+
this.request_id = request_id;
|
|
61
|
+
this.first_name = first_name;
|
|
62
|
+
this.family_name = family_name;
|
|
63
|
+
this.last_name = last_name;
|
|
64
|
+
this.gender = gender;
|
|
65
|
+
this.nationality = nationality;
|
|
66
|
+
this.place_of_birth = place_of_birth;
|
|
67
|
+
this.job_occupation = job_occupation;
|
|
68
|
+
this.relation = relation;
|
|
69
|
+
this.age = age;
|
|
70
|
+
this.passport_request_type = passport_request_type;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum PassportType {
|
|
5
|
+
DIPLOMATIC = "Diplomatic Passport",
|
|
6
|
+
SERVICE = "Service passport"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum ApplicationFor {
|
|
10
|
+
SELF = "Self",
|
|
11
|
+
DEPENDENTS = "Dependents",
|
|
12
|
+
BOTH = "Both"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum PassportRequestType {
|
|
16
|
+
NEW = "New",
|
|
17
|
+
RENEW = "Renew",
|
|
18
|
+
LOST_STOLEN = "Lost / Stolen"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum PassportRequestStatus {
|
|
22
|
+
PENDING = "Pending",
|
|
23
|
+
APPROVED = "Approved",
|
|
24
|
+
REJECTED = "Rejected",
|
|
25
|
+
IN_PROGRESS = "In Progress"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Entity({ name: 'passport_requests' })
|
|
29
|
+
export class PassportRequests extends BaseModel {
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
32
|
+
request_number: string | null; // For official use
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
35
|
+
passport_type: PassportType; // Auto filled based on profile (Diplomatic/Service)
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
38
|
+
applicant_civil_id: string | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
41
|
+
applicant_name: string | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
44
|
+
applicant_passport_number: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'enum', enum: ApplicationFor, nullable: false })
|
|
47
|
+
application_for: ApplicationFor; // Self / Dependents / Both
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
50
|
+
application_type: string | null; // نوع الطلب
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
53
|
+
applicant_job_occupation: string | null; // جهة العمل
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'text', nullable: true })
|
|
56
|
+
purpose_of_application: string | null; // الغرض من تقديم الطلب
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'int', nullable: false })
|
|
59
|
+
approved_mission_travel_id: number; // Mandatory - Mission Travel ID
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'enum', enum: PassportRequestStatus, default: PassportRequestStatus.PENDING, nullable: false })
|
|
62
|
+
status: PassportRequestStatus;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'int', nullable: true })
|
|
65
|
+
service_id: number | null;
|
|
66
|
+
|
|
67
|
+
@Column({ type: 'int', nullable: true })
|
|
68
|
+
sub_service_id: number | null;
|
|
69
|
+
|
|
70
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
71
|
+
workflow_execution_id: string | null;
|
|
72
|
+
|
|
73
|
+
@Column({ type: 'int', nullable: false })
|
|
74
|
+
user_id: number; // Employee who created the request
|
|
75
|
+
|
|
76
|
+
@Column({ type: 'text', nullable: true })
|
|
77
|
+
notes: string | null;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
passport_type: PassportType,
|
|
81
|
+
application_for: ApplicationFor,
|
|
82
|
+
approved_mission_travel_id: number,
|
|
83
|
+
user_id: number,
|
|
84
|
+
request_number?: string | null,
|
|
85
|
+
applicant_civil_id?: string | null,
|
|
86
|
+
applicant_name?: string | null,
|
|
87
|
+
applicant_passport_number?: string | null,
|
|
88
|
+
application_type?: string | null,
|
|
89
|
+
applicant_job_occupation?: string | null,
|
|
90
|
+
purpose_of_application?: string | null,
|
|
91
|
+
status?: PassportRequestStatus,
|
|
92
|
+
service_id?: number | null,
|
|
93
|
+
sub_service_id?: number | null,
|
|
94
|
+
workflow_execution_id?: string | null,
|
|
95
|
+
notes?: string | null
|
|
96
|
+
) {
|
|
97
|
+
super();
|
|
98
|
+
this.request_number = request_number || null;
|
|
99
|
+
this.passport_type = passport_type;
|
|
100
|
+
this.applicant_civil_id = applicant_civil_id || null;
|
|
101
|
+
this.applicant_name = applicant_name || null;
|
|
102
|
+
this.applicant_passport_number = applicant_passport_number || null;
|
|
103
|
+
this.application_for = application_for;
|
|
104
|
+
this.application_type = application_type || null;
|
|
105
|
+
this.applicant_job_occupation = applicant_job_occupation || null;
|
|
106
|
+
this.purpose_of_application = purpose_of_application || null;
|
|
107
|
+
this.approved_mission_travel_id = approved_mission_travel_id;
|
|
108
|
+
this.status = status || PassportRequestStatus.PENDING;
|
|
109
|
+
this.service_id = service_id || null;
|
|
110
|
+
this.sub_service_id = sub_service_id || null;
|
|
111
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
112
|
+
this.user_id = user_id;
|
|
113
|
+
this.notes = notes || null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum PassportRequestWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'passport_request_work_flows' })
|
|
11
|
+
export class PassportRequestWorkFlow extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number; // Reference to passport_requests
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
17
|
+
approval_details_id: number; // Reference to passport_request_approvals
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
20
|
+
content: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'enum', enum: PassportRequestWorkFlowStatus, default: PassportRequestWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
23
|
+
status: PassportRequestWorkFlowStatus;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
service_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'int', nullable: true })
|
|
29
|
+
sub_service_id: number | null;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
request_id: number,
|
|
33
|
+
content: string,
|
|
34
|
+
approval_details_id?: number,
|
|
35
|
+
status?: PassportRequestWorkFlowStatus,
|
|
36
|
+
service_id?: number | null,
|
|
37
|
+
sub_service_id?: number | null
|
|
38
|
+
) {
|
|
39
|
+
super();
|
|
40
|
+
this.request_id = request_id;
|
|
41
|
+
this.approval_details_id = approval_details_id || 0;
|
|
42
|
+
this.content = content;
|
|
43
|
+
this.status = status || PassportRequestWorkFlowStatus.NOT_YET_STARTED;
|
|
44
|
+
this.service_id = service_id || null;
|
|
45
|
+
this.sub_service_id = sub_service_id || null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { MembershipType } from './DiplomaticClubCardRequestModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'subscription_amounts' })
|
|
6
|
+
export class SubscriptionAmounts extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'enum', enum: MembershipType, nullable: false })
|
|
9
|
+
membership_type: MembershipType; // Single or Family
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
|
|
12
|
+
amount: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
15
|
+
description: string | null;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
18
|
+
is_active: boolean;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'date', nullable: true })
|
|
21
|
+
effective_from: Date | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'date', nullable: true })
|
|
24
|
+
effective_to: Date | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { TaskType } from "./WorkflowTaskNames";
|
|
4
|
-
import { CategoryType } from "./WorkflowTaskNames";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// export enum TaskNameType {
|
|
8
|
-
// SIMPLE = 'SIMPLE',
|
|
9
|
-
// HUMAN = 'HUMAN'
|
|
10
|
-
// }
|
|
11
|
-
|
|
12
|
-
// export enum CategoryNameType {
|
|
13
|
-
// CREATE = 'CREATE',
|
|
14
|
-
// APPROVAL = 'APPROVAL',
|
|
15
|
-
// NOTIFICATION = 'NOTIFICATION'
|
|
16
|
-
// }
|
|
17
3
|
|
|
18
4
|
@Entity({ name: 'workflow_tasks' })
|
|
19
5
|
export class WorkflowTask extends BaseModel {
|
|
@@ -24,30 +10,17 @@ export class WorkflowTask extends BaseModel {
|
|
|
24
10
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
25
11
|
name: string;
|
|
26
12
|
|
|
27
|
-
@Column({
|
|
28
|
-
|
|
29
|
-
enum: TaskType,
|
|
30
|
-
nullable: true
|
|
31
|
-
})
|
|
32
|
-
task_type: TaskType;
|
|
33
|
-
|
|
34
|
-
@Column({
|
|
35
|
-
type: 'enum',
|
|
36
|
-
enum: CategoryType,
|
|
37
|
-
nullable: true
|
|
38
|
-
})
|
|
39
|
-
category: CategoryType;
|
|
13
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
14
|
+
task_type: string;
|
|
40
15
|
|
|
41
16
|
constructor(
|
|
42
17
|
name: string,
|
|
43
18
|
task_id?: number,
|
|
44
|
-
task_type?:
|
|
45
|
-
category?: CategoryType
|
|
19
|
+
task_type?: string
|
|
46
20
|
) {
|
|
47
21
|
super();
|
|
48
22
|
this.name = name;
|
|
49
23
|
this.task_id = task_id || 0;
|
|
50
|
-
this.task_type = task_type ||
|
|
51
|
-
this.category = category || CategoryType.CREATE;
|
|
24
|
+
this.task_type = task_type || '';
|
|
52
25
|
}
|
|
53
26
|
}
|
|
@@ -1,50 +1,31 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum TaskType {
|
|
5
|
-
SIMPLE = 'SIMPLE',
|
|
6
|
-
HUMAN = 'HUMAN'
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum CategoryType {
|
|
10
|
-
CREATE = 'CREATE',
|
|
11
|
-
APPROVAL = 'APPROVAL',
|
|
12
|
-
NOTIFICATION = 'NOTIFICATION'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
4
|
@Entity({ name: 'workflow_task_names' })
|
|
16
5
|
export class WorkflowTaskNames extends BaseModel {
|
|
17
6
|
|
|
18
7
|
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
19
8
|
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: false })
|
|
11
|
+
task_id: number;
|
|
20
12
|
|
|
21
13
|
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
22
14
|
description: string;
|
|
23
15
|
|
|
24
|
-
@Column({
|
|
25
|
-
|
|
26
|
-
enum: TaskType,
|
|
27
|
-
nullable: true
|
|
28
|
-
})
|
|
29
|
-
task_type: TaskType;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
type: 'enum',
|
|
33
|
-
enum: CategoryType,
|
|
34
|
-
nullable: true
|
|
35
|
-
})
|
|
36
|
-
category: CategoryType;
|
|
16
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
17
|
+
task_type: string;
|
|
37
18
|
|
|
38
19
|
constructor(
|
|
39
20
|
name: string,
|
|
21
|
+
task_id: number,
|
|
40
22
|
description: string,
|
|
41
|
-
task_type:
|
|
42
|
-
category: CategoryType
|
|
23
|
+
task_type: string
|
|
43
24
|
) {
|
|
44
25
|
super();
|
|
45
26
|
this.name = name;
|
|
27
|
+
this.task_id = task_id;
|
|
46
28
|
this.description = description;
|
|
47
29
|
this.task_type = task_type;
|
|
48
|
-
this.category = category;
|
|
49
30
|
}
|
|
50
31
|
}
|
|
@@ -1,34 +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.HelpContentMappedTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedTags);
|
|
@@ -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.HelpContentTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name) {
|
|
17
|
-
super();
|
|
18
|
-
this.name = name;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.HelpContentTags = HelpContentTags;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], HelpContentTags.prototype, "name", void 0);
|
|
26
|
-
exports.HelpContentTags = HelpContentTags = __decorate([
|
|
27
|
-
(0, typeorm_1.Entity)({ name: 'help_content_tags' }),
|
|
28
|
-
__metadata("design:paramtypes", [String])
|
|
29
|
-
], HelpContentTags);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum UpdateAttendanceApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
IN_PROGRESS = "In Progress",
|
|
5
|
-
APPROVED = "Approved",
|
|
6
|
-
REJECTED = "Rejected"
|
|
7
|
-
}
|
|
8
|
-
export declare class UpdateAttendanceApprovalDetails extends BaseModel {
|
|
9
|
-
request_id: number;
|
|
10
|
-
service_id: number | null;
|
|
11
|
-
sub_service_id: number | null;
|
|
12
|
-
level: number;
|
|
13
|
-
approver_role_id: number;
|
|
14
|
-
department_id: number | null;
|
|
15
|
-
section_id: number | null;
|
|
16
|
-
approver_user_id: number | null;
|
|
17
|
-
delegate_user_id: number | null;
|
|
18
|
-
approved_by: number | null;
|
|
19
|
-
comment: string;
|
|
20
|
-
approval_status: UpdateAttendanceApprovalStatus;
|
|
21
|
-
}
|