@platform-modules/foreign-ministry 1.2.14 → 1.2.16
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 +11 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -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/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 +2 -7
- package/dist/models/DiplomaticClubSubscriptionMasterModel.js +4 -29
- 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 +0 -4
- package/dist/models/DiplomaticTitlesMasterModel.js +0 -18
- package/dist/models/EmployeeCardApprovalsModel.d.ts +31 -0
- package/dist/models/EmployeeCardApprovalsModel.js +100 -0
- package/dist/models/EmployeeCardAttachmentsModel.d.ts +17 -0
- package/dist/models/EmployeeCardAttachmentsModel.js +69 -0
- package/dist/models/EmployeeCardChatsModel.d.ts +19 -0
- package/dist/models/EmployeeCardChatsModel.js +79 -0
- package/dist/models/EmployeeCardRequestsModel.d.ts +40 -0
- package/dist/models/EmployeeCardRequestsModel.js +126 -0
- package/dist/models/EmployeeCardWorkFlowModel.d.ts +34 -0
- package/dist/models/EmployeeCardWorkFlowModel.js +103 -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 +11 -1
- package/src/index.ts +6 -1
- package/src/models/DiplomaticClubSubscriptionMasterModel.ts +26 -50
- package/src/models/DiplomaticRequestsModel.ts +154 -154
- package/src/models/DiplomaticTitlesMasterModel.ts +0 -14
- package/src/models/EmployeeCardApprovalsModel.ts +87 -0
- package/src/models/EmployeeCardAttachmentsModel.ts +56 -0
- package/src/models/EmployeeCardChatsModel.ts +66 -0
- package/src/models/EmployeeCardRequestsModel.ts +115 -0
- package/src/models/EmployeeCardWorkFlowModel.ts +90 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Workflow Status Enum
|
|
6
|
+
*/
|
|
7
|
+
export enum EmployeeCardWorkFlowStatus {
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
10
|
+
PENDING = "Pending",
|
|
11
|
+
IN_PROGRESS = "In Progress"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Employee Card Workflow Table
|
|
16
|
+
* Tracks the progress of the request through different workflow stages
|
|
17
|
+
* Provides a timeline/audit trail of the approval process
|
|
18
|
+
*
|
|
19
|
+
* Workflow paths:
|
|
20
|
+
* - Normal: Employee → Department Admin Office → Security
|
|
21
|
+
* - Special: Employee → Department Admin Office → US → Security
|
|
22
|
+
*/
|
|
23
|
+
@Entity({ name: 'employee_card_work_flows' })
|
|
24
|
+
export class EmployeeCardWorkFlow extends BaseModel {
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: false })
|
|
27
|
+
employee_card_request_id: number; // Foreign key to employee_card_requests
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
30
|
+
employee_card_approval_details_id: number; // Foreign key to employee_card_approvals
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
33
|
+
content: string; // Description of the workflow step (e.g., "Pending Department Admin Office Approval")
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'enum', enum: EmployeeCardWorkFlowStatus, default: EmployeeCardWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
36
|
+
status: EmployeeCardWorkFlowStatus; // Current status of this workflow step
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'integer', nullable: true })
|
|
39
|
+
user_id: number | null; // User responsible for this step
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'integer', nullable: true })
|
|
42
|
+
role_id: number | null; // Role responsible for this step
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'integer', nullable: true })
|
|
45
|
+
department_id: number | null; // Department involved in this step
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'integer', nullable: true })
|
|
48
|
+
section_id: number | null; // Section involved in this step
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'integer', nullable: false, default: 1 })
|
|
51
|
+
level: number; // Workflow level (1: Dept Admin, 2: US/Security, 3: Security for Special)
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
54
|
+
access_type: string | null; // Normal or Special - to track workflow path
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
57
|
+
action_taken: string | null; // Action taken (e.g., "Approved", "Rejected", "Forwarded")
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'timestamptz', nullable: true })
|
|
60
|
+
action_date: Date | null; // When the action was taken
|
|
61
|
+
|
|
62
|
+
constructor(
|
|
63
|
+
employee_card_request_id: number,
|
|
64
|
+
employee_card_approval_details_id: number,
|
|
65
|
+
content: string,
|
|
66
|
+
status: EmployeeCardWorkFlowStatus,
|
|
67
|
+
user_id: number | null,
|
|
68
|
+
role_id: number | null,
|
|
69
|
+
department_id: number | null,
|
|
70
|
+
section_id: number | null,
|
|
71
|
+
level: number,
|
|
72
|
+
access_type: string | null,
|
|
73
|
+
action_taken: string | null,
|
|
74
|
+
action_date: Date | null
|
|
75
|
+
) {
|
|
76
|
+
super();
|
|
77
|
+
this.employee_card_request_id = employee_card_request_id;
|
|
78
|
+
this.employee_card_approval_details_id = employee_card_approval_details_id;
|
|
79
|
+
this.content = content;
|
|
80
|
+
this.status = status;
|
|
81
|
+
this.user_id = user_id;
|
|
82
|
+
this.role_id = role_id;
|
|
83
|
+
this.department_id = department_id;
|
|
84
|
+
this.section_id = section_id;
|
|
85
|
+
this.level = level;
|
|
86
|
+
this.access_type = access_type;
|
|
87
|
+
this.action_taken = action_taken;
|
|
88
|
+
this.action_date = action_date;
|
|
89
|
+
}
|
|
90
|
+
}
|