@platform-modules/foreign-ministry 1.1.60 → 1.1.62
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 +17 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/models/DiplomaticApprovalsModel.d.ts +24 -0
- package/dist/models/DiplomaticApprovalsModel.js +94 -0
- package/dist/models/DiplomaticAttachmentsModel.d.ts +11 -0
- package/dist/models/DiplomaticAttachmentsModel.js +53 -0
- package/dist/models/DiplomaticChatsModel.d.ts +20 -0
- package/dist/models/DiplomaticChatsModel.js +70 -0
- 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/DiplomaticClubCardChatModel.js +36 -0
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +13 -0
- package/dist/models/DiplomaticClubCardMemberModel.js +60 -0
- package/dist/models/DiplomaticClubCardMembersModel.d.ts +37 -0
- package/dist/models/DiplomaticClubCardMembersModel.js +139 -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/DiplomaticClubSubscriptionMasterModel.d.ts +11 -0
- package/dist/models/DiplomaticClubSubscriptionMasterModel.js +59 -0
- package/dist/models/DiplomaticRequestsModel.d.ts +43 -0
- package/dist/models/DiplomaticRequestsModel.js +142 -0
- package/dist/models/DiplomaticServiceDetailsModel.d.ts +20 -0
- package/dist/models/DiplomaticServiceDetailsModel.js +65 -0
- package/dist/models/DiplomaticSettingsModel.d.ts +11 -0
- package/dist/models/DiplomaticSettingsModel.js +59 -0
- package/dist/models/DiplomaticTitleModel.d.ts +12 -0
- package/dist/models/DiplomaticTitleModel.js +45 -0
- package/dist/models/DiplomaticTitlesMasterModel.d.ts +13 -0
- package/dist/models/DiplomaticTitlesMasterModel.js +54 -0
- package/dist/models/DiplomaticWorkFlowModel.d.ts +18 -0
- package/dist/models/DiplomaticWorkFlowModel.js +69 -0
- 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 +67 -0
- package/dist/models/SubscriptionAmountModel.js +114 -0
- package/package.json +1 -1
- package/src/data-source.ts +18 -2
- package/src/index.ts +9 -1
- package/src/models/DiplomaticApprovalsModel.ts +77 -0
- package/src/models/DiplomaticAttachmentsModel.ts +37 -0
- package/src/models/DiplomaticChatsModel.ts +53 -0
- package/src/models/DiplomaticClubCardMembersModel.ts +124 -0
- package/src/models/DiplomaticClubSubscriptionMasterModel.ts +45 -0
- package/src/models/DiplomaticRequestsModel.ts +121 -0
- package/src/models/DiplomaticTitlesMasterModel.ts +39 -0
- package/src/models/DiplomaticWorkFlowModel.ts +53 -0
- package/dist/models/StationeryRequestsModel.d.ts +0 -23
- package/dist/models/StationeryRequestsModel.js +0 -80
- package/src/models/StationeryRequestsModel.ts +0 -53
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'diplomatic_attachments' })
|
|
6
|
+
export class DiplomaticAttachments extends BaseModel {
|
|
7
|
+
@Column({ type: 'int' })
|
|
8
|
+
diplomatic_request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 500 })
|
|
11
|
+
file_url: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
14
|
+
file_name: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
17
|
+
file_type: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'bigint', nullable: true })
|
|
20
|
+
file_size: number | null;
|
|
21
|
+
|
|
22
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.attachments)
|
|
23
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
24
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
diplomatic_request_id: number,
|
|
28
|
+
file_url: string,
|
|
29
|
+
file_name: string
|
|
30
|
+
) {
|
|
31
|
+
super();
|
|
32
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
33
|
+
this.file_url = file_url;
|
|
34
|
+
this.file_name = file_name;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum DiplomaticMessageType {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
VIDEO = "video",
|
|
9
|
+
FILE = "file",
|
|
10
|
+
AUDIO = "audio"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'diplomatic_chats' })
|
|
14
|
+
export class DiplomaticChats extends BaseModel {
|
|
15
|
+
@Column({ type: 'int' })
|
|
16
|
+
diplomatic_request_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text' })
|
|
19
|
+
content: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int' })
|
|
22
|
+
sender_user_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
role_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
28
|
+
status: string | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
31
|
+
message_type: DiplomaticMessageType | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', nullable: true })
|
|
34
|
+
sender_role_id: number | null;
|
|
35
|
+
|
|
36
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.chats)
|
|
37
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
38
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
diplomatic_request_id: number,
|
|
42
|
+
content: string,
|
|
43
|
+
sender_user_id: number,
|
|
44
|
+
sender_role_id: number
|
|
45
|
+
) {
|
|
46
|
+
super();
|
|
47
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
48
|
+
this.content = content;
|
|
49
|
+
this.sender_user_id = sender_user_id;
|
|
50
|
+
this.sender_role_id = sender_role_id;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum MembershipType {
|
|
6
|
+
SINGLE = "Single",
|
|
7
|
+
FAMILY = "Family"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum RequestType {
|
|
11
|
+
EMPLOYEE_SELF = "Employee Self",
|
|
12
|
+
NON_EMPLOYEE = "Non Employee"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum MemberType {
|
|
16
|
+
PRIMARY = "Primary",
|
|
17
|
+
FAMILY_MEMBER = "Family Member"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Entity({ name: 'diplomatic_club_card_members' })
|
|
21
|
+
export class DiplomaticClubCardMembers extends BaseModel {
|
|
22
|
+
@Column({ type: 'int' })
|
|
23
|
+
diplomatic_request_id: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'enum', enum: MembershipType })
|
|
26
|
+
membership_type: MembershipType;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'enum', enum: MemberType, default: MemberType.PRIMARY })
|
|
29
|
+
member_type: MemberType;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 255 })
|
|
32
|
+
member_name: string;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
35
|
+
relation: string | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
38
|
+
membership_id: string | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
41
|
+
title: string | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
44
|
+
diplomatic_title: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'int', nullable: true })
|
|
47
|
+
diplomatic_title_id: number | null;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
50
|
+
organization: string | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'date', nullable: true })
|
|
53
|
+
expiry_date: Date | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
56
|
+
photo_url: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
59
|
+
subscription_amount: number | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'int', nullable: true })
|
|
62
|
+
subscription_amount_id: number | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'enum', enum: RequestType, default: RequestType.EMPLOYEE_SELF })
|
|
65
|
+
request_type: RequestType;
|
|
66
|
+
|
|
67
|
+
@Column({ type: 'int', nullable: true })
|
|
68
|
+
created_by_user_id: number | null;
|
|
69
|
+
|
|
70
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
71
|
+
location: string | null;
|
|
72
|
+
|
|
73
|
+
@Column({ type: 'int', nullable: true })
|
|
74
|
+
service_id: number | null;
|
|
75
|
+
|
|
76
|
+
@Column({ type: 'int', nullable: true })
|
|
77
|
+
sub_service_id: number | null;
|
|
78
|
+
|
|
79
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.diplomaticClubCardMembers)
|
|
80
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
81
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
82
|
+
|
|
83
|
+
constructor(
|
|
84
|
+
diplomatic_request_id: number,
|
|
85
|
+
membership_type: MembershipType,
|
|
86
|
+
member_name: string,
|
|
87
|
+
member_type: MemberType = MemberType.PRIMARY,
|
|
88
|
+
request_type: RequestType = RequestType.EMPLOYEE_SELF,
|
|
89
|
+
relation?: string | null,
|
|
90
|
+
membership_id?: string | null,
|
|
91
|
+
title?: string | null,
|
|
92
|
+
diplomatic_title?: string | null,
|
|
93
|
+
diplomatic_title_id?: number | null,
|
|
94
|
+
organization?: string | null,
|
|
95
|
+
expiry_date?: Date | null,
|
|
96
|
+
photo_url?: string | null,
|
|
97
|
+
subscription_amount?: number | null,
|
|
98
|
+
subscription_amount_id?: number | null,
|
|
99
|
+
location?: string | null,
|
|
100
|
+
service_id?: number | null,
|
|
101
|
+
sub_service_id?: number | null
|
|
102
|
+
) {
|
|
103
|
+
super();
|
|
104
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
105
|
+
this.membership_type = membership_type;
|
|
106
|
+
this.member_name = member_name;
|
|
107
|
+
this.member_type = member_type;
|
|
108
|
+
this.request_type = request_type;
|
|
109
|
+
this.relation = relation || null;
|
|
110
|
+
this.membership_id = membership_id || null;
|
|
111
|
+
this.title = title || null;
|
|
112
|
+
this.diplomatic_title = diplomatic_title || null;
|
|
113
|
+
this.diplomatic_title_id = diplomatic_title_id || null;
|
|
114
|
+
this.organization = organization || null;
|
|
115
|
+
this.expiry_date = expiry_date || null;
|
|
116
|
+
this.photo_url = photo_url || null;
|
|
117
|
+
this.subscription_amount = subscription_amount || null;
|
|
118
|
+
this.subscription_amount_id = subscription_amount_id || null;
|
|
119
|
+
this.location = location || null;
|
|
120
|
+
this.service_id = service_id || null;
|
|
121
|
+
this.sub_service_id = sub_service_id || null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'diplomatic_club_subscription_master' })
|
|
5
|
+
export class DiplomaticClubSubscriptionMaster extends BaseModel {
|
|
6
|
+
@Column({ type: 'varchar', length: 100 })
|
|
7
|
+
subscription_type: string; // e.g., "Single", "Family"
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
10
|
+
subscription_amount: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
13
|
+
currency: string | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'text', nullable: true })
|
|
16
|
+
description: string | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'boolean', default: true })
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'date', nullable: true })
|
|
22
|
+
effective_from: Date | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'date', nullable: true })
|
|
25
|
+
effective_to: Date | null;
|
|
26
|
+
|
|
27
|
+
constructor(
|
|
28
|
+
subscription_type: string,
|
|
29
|
+
subscription_amount: number,
|
|
30
|
+
currency?: string | null,
|
|
31
|
+
description?: string | null,
|
|
32
|
+
effective_from?: Date | null,
|
|
33
|
+
effective_to?: Date | null
|
|
34
|
+
) {
|
|
35
|
+
super();
|
|
36
|
+
this.subscription_type = subscription_type;
|
|
37
|
+
this.subscription_amount = subscription_amount;
|
|
38
|
+
this.currency = currency || null;
|
|
39
|
+
this.description = description || null;
|
|
40
|
+
this.is_active = true;
|
|
41
|
+
this.effective_from = effective_from || null;
|
|
42
|
+
this.effective_to = effective_to || null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
// Import types only (not for runtime)
|
|
5
|
+
import type { DiplomaticApprovals } from './DiplomaticApprovalsModel';
|
|
6
|
+
import type { DiplomaticWorkFlow } from './DiplomaticWorkFlowModel';
|
|
7
|
+
import type { DiplomaticAttachments } from './DiplomaticAttachmentsModel';
|
|
8
|
+
import type { DiplomaticChats } from './DiplomaticChatsModel';
|
|
9
|
+
import type { DiplomaticClubCardMembers } from './DiplomaticClubCardMembersModel';
|
|
10
|
+
|
|
11
|
+
export enum DiplomaticRequestStatus {
|
|
12
|
+
DRAFT = "Draft",
|
|
13
|
+
SUBMITTED = "Submitted",
|
|
14
|
+
PENDING = "Pending",
|
|
15
|
+
IN_PROGRESS = "In Progress",
|
|
16
|
+
APPROVED = "Approved",
|
|
17
|
+
REJECTED = "Rejected",
|
|
18
|
+
COMPLETED = "Completed",
|
|
19
|
+
CANCELLED = "Cancelled"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Entity({ name: 'diplomatic_requests' })
|
|
23
|
+
export class DiplomaticRequests extends BaseModel {
|
|
24
|
+
@Column({ type: 'int' })
|
|
25
|
+
user_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 100 })
|
|
28
|
+
employee_id: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 255 })
|
|
31
|
+
employee_name: string;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
34
|
+
grade: string | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
designation_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
department_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'varchar', length: 255 })
|
|
43
|
+
email_address: string;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'varchar', length: 20 })
|
|
46
|
+
contact_number: string;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
49
|
+
request_date: Date;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'enum', enum: DiplomaticRequestStatus, default: DiplomaticRequestStatus.PENDING })
|
|
52
|
+
request_status: DiplomaticRequestStatus;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
55
|
+
request_close_date: Date | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'text', nullable: true })
|
|
58
|
+
remarks: string | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'int', nullable: true })
|
|
61
|
+
current_approval_level: number | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'int', nullable: true })
|
|
64
|
+
current_approver_id: number | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'int', nullable: true })
|
|
67
|
+
service_id: number | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: 'int', nullable: true })
|
|
70
|
+
sub_service_id: number | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: 'int', nullable: true })
|
|
73
|
+
section_id: number | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: 'int', nullable: true })
|
|
76
|
+
reporting_manager: number | null;
|
|
77
|
+
|
|
78
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
79
|
+
workflow_execution_id: string | null;
|
|
80
|
+
|
|
81
|
+
@OneToMany('DiplomaticClubCardMembers', 'diplomaticRequest', { nullable: true })
|
|
82
|
+
diplomaticClubCardMembers?: DiplomaticClubCardMembers[];
|
|
83
|
+
|
|
84
|
+
@OneToMany('DiplomaticApprovals', 'diplomaticRequest')
|
|
85
|
+
approvals?: DiplomaticApprovals[];
|
|
86
|
+
|
|
87
|
+
@OneToMany('DiplomaticWorkFlow', 'diplomaticRequest')
|
|
88
|
+
workflows?: DiplomaticWorkFlow[];
|
|
89
|
+
|
|
90
|
+
@OneToMany('DiplomaticAttachments', 'diplomaticRequest')
|
|
91
|
+
attachments?: DiplomaticAttachments[];
|
|
92
|
+
|
|
93
|
+
@OneToMany('DiplomaticChats', 'diplomaticRequest')
|
|
94
|
+
chats?: DiplomaticChats[];
|
|
95
|
+
|
|
96
|
+
constructor(
|
|
97
|
+
user_id: number,
|
|
98
|
+
employee_id: string,
|
|
99
|
+
employee_name: string,
|
|
100
|
+
email_address: string,
|
|
101
|
+
contact_number: string,
|
|
102
|
+
service_id: number | null,
|
|
103
|
+
sub_service_id: number | null,
|
|
104
|
+
section_id: number | null,
|
|
105
|
+
reporting_manager: number | null
|
|
106
|
+
) {
|
|
107
|
+
super();
|
|
108
|
+
this.user_id = user_id;
|
|
109
|
+
this.employee_id = employee_id;
|
|
110
|
+
this.employee_name = employee_name;
|
|
111
|
+
this.email_address = email_address;
|
|
112
|
+
this.contact_number = contact_number;
|
|
113
|
+
this.request_date = new Date();
|
|
114
|
+
this.request_status = DiplomaticRequestStatus.PENDING;
|
|
115
|
+
this.service_id = service_id;
|
|
116
|
+
this.sub_service_id = sub_service_id;
|
|
117
|
+
this.section_id = section_id;
|
|
118
|
+
this.reporting_manager = reporting_manager;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum TitleCategory {
|
|
5
|
+
EMPLOYEE = "Employee",
|
|
6
|
+
NON_EMPLOYEE = "Non Employee"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'diplomatic_titles_master' })
|
|
10
|
+
export class DiplomaticTitlesMaster extends BaseModel {
|
|
11
|
+
@Column({ type: 'varchar', length: 255 })
|
|
12
|
+
title_name: string;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'enum', enum: TitleCategory })
|
|
15
|
+
category: TitleCategory;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'text', nullable: true })
|
|
18
|
+
description: string | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'boolean', default: true })
|
|
21
|
+
is_active: boolean;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', default: 0 })
|
|
24
|
+
display_order: number;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
title_name: string,
|
|
28
|
+
category: TitleCategory,
|
|
29
|
+
description?: string | null
|
|
30
|
+
) {
|
|
31
|
+
super();
|
|
32
|
+
this.title_name = title_name;
|
|
33
|
+
this.category = category;
|
|
34
|
+
this.description = description || null;
|
|
35
|
+
this.is_active = true;
|
|
36
|
+
this.display_order = 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum DiplomaticWorkFlowStatus {
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
8
|
+
PENDING = "Pending"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'diplomatic_workflows' })
|
|
12
|
+
export class DiplomaticWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'int' })
|
|
14
|
+
diplomatic_request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500 })
|
|
17
|
+
content: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'enum', enum: DiplomaticWorkFlowStatus, default: DiplomaticWorkFlowStatus.NOT_YET_STARTED })
|
|
20
|
+
status: DiplomaticWorkFlowStatus;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int', nullable: true })
|
|
23
|
+
user_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
step_order: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'int', nullable: true })
|
|
29
|
+
diplomatic_approval_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'int', nullable: true })
|
|
32
|
+
approved_by_role_id: number | null;
|
|
33
|
+
|
|
34
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.workflows)
|
|
35
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
36
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
37
|
+
|
|
38
|
+
constructor(
|
|
39
|
+
diplomatic_request_id: number,
|
|
40
|
+
content: string,
|
|
41
|
+
status: DiplomaticWorkFlowStatus,
|
|
42
|
+
user_id: number | null,
|
|
43
|
+
step_order: number | null
|
|
44
|
+
) {
|
|
45
|
+
super();
|
|
46
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
47
|
+
this.content = content;
|
|
48
|
+
this.status = status;
|
|
49
|
+
this.user_id = user_id;
|
|
50
|
+
this.step_order = step_order;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum StationeryRequestStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
ASSIGNED = "Assigned",
|
|
5
|
-
IN_PROGRESS = "In Progress",
|
|
6
|
-
APPROVED = "Approved",
|
|
7
|
-
REJECTED = "Rejected"
|
|
8
|
-
}
|
|
9
|
-
export declare class StationeryRequests extends BaseModel {
|
|
10
|
-
req_user_department_id: number | null;
|
|
11
|
-
req_user_section_id: number | null;
|
|
12
|
-
service_id: number | null;
|
|
13
|
-
sub_service_id: number | null;
|
|
14
|
-
user_id: number;
|
|
15
|
-
date_of_request_preparation: Date;
|
|
16
|
-
office: string;
|
|
17
|
-
material_type: string;
|
|
18
|
-
material_name: string;
|
|
19
|
-
quantity_required: number;
|
|
20
|
-
comments: string | null;
|
|
21
|
-
status: StationeryRequestStatus;
|
|
22
|
-
workflow_execution_id: string | null;
|
|
23
|
-
}
|
|
@@ -1,80 +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.StationeryRequests = exports.StationeryRequestStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var StationeryRequestStatus;
|
|
16
|
-
(function (StationeryRequestStatus) {
|
|
17
|
-
StationeryRequestStatus["PENDING"] = "Pending";
|
|
18
|
-
StationeryRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
-
StationeryRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
-
StationeryRequestStatus["APPROVED"] = "Approved";
|
|
21
|
-
StationeryRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
-
})(StationeryRequestStatus || (exports.StationeryRequestStatus = StationeryRequestStatus = {}));
|
|
23
|
-
let StationeryRequests = class StationeryRequests extends BaseModel_1.BaseModel {
|
|
24
|
-
};
|
|
25
|
-
exports.StationeryRequests = StationeryRequests;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
28
|
-
__metadata("design:type", Object)
|
|
29
|
-
], StationeryRequests.prototype, "req_user_department_id", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
32
|
-
__metadata("design:type", Object)
|
|
33
|
-
], StationeryRequests.prototype, "req_user_section_id", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
36
|
-
__metadata("design:type", Object)
|
|
37
|
-
], StationeryRequests.prototype, "service_id", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], StationeryRequests.prototype, "sub_service_id", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], StationeryRequests.prototype, "user_id", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
48
|
-
__metadata("design:type", Date)
|
|
49
|
-
], StationeryRequests.prototype, "date_of_request_preparation", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], StationeryRequests.prototype, "office", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], StationeryRequests.prototype, "material_type", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], StationeryRequests.prototype, "material_name", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], StationeryRequests.prototype, "quantity_required", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], StationeryRequests.prototype, "comments", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: StationeryRequestStatus, default: StationeryRequestStatus.PENDING, nullable: false }),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], StationeryRequests.prototype, "status", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
76
|
-
__metadata("design:type", Object)
|
|
77
|
-
], StationeryRequests.prototype, "workflow_execution_id", void 0);
|
|
78
|
-
exports.StationeryRequests = StationeryRequests = __decorate([
|
|
79
|
-
(0, typeorm_1.Entity)({ name: 'stationery_requests' })
|
|
80
|
-
], StationeryRequests);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum StationeryRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
ASSIGNED = "Assigned",
|
|
7
|
-
IN_PROGRESS = "In Progress",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Entity({ name: 'stationery_requests' })
|
|
13
|
-
export class StationeryRequests extends BaseModel {
|
|
14
|
-
@Column({ type: 'int', nullable: true })
|
|
15
|
-
req_user_department_id: number | null;
|
|
16
|
-
|
|
17
|
-
@Column({ type: 'int', nullable: true })
|
|
18
|
-
req_user_section_id: number | null;
|
|
19
|
-
|
|
20
|
-
@Column({ type: 'int', nullable: true })
|
|
21
|
-
service_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: 'int', nullable: true })
|
|
24
|
-
sub_service_id: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'int', nullable: false })
|
|
27
|
-
user_id: number;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'date', nullable: false })
|
|
30
|
-
date_of_request_preparation: Date;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
33
|
-
office: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
36
|
-
material_type: string;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
39
|
-
material_name: string;
|
|
40
|
-
|
|
41
|
-
@Column({ type: 'int', nullable: false })
|
|
42
|
-
quantity_required: number;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
45
|
-
comments: string | null;
|
|
46
|
-
|
|
47
|
-
@Column({ type: 'enum', enum: StationeryRequestStatus, default: StationeryRequestStatus.PENDING, nullable: false })
|
|
48
|
-
status: StationeryRequestStatus;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'varchar', nullable: true })
|
|
51
|
-
workflow_execution_id: string | null;
|
|
52
|
-
}
|
|
53
|
-
|