1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
//! Employee, skill, organizational, and project types for enterprise knowledge.
use crate::Vector;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// Employee embedding with professional context
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EmployeeEmbedding {
/// Employee unique identifier
pub employee_id: String,
/// Employee name
pub name: String,
/// Job title
pub job_title: String,
/// Department
pub department: String,
/// Team
pub team: String,
/// Skills
pub skills: Vec<Skill>,
/// Experience level
pub experience_level: ExperienceLevel,
/// Performance metrics
pub performance_metrics: PerformanceMetrics,
/// Project history
pub project_history: Vec<ProjectParticipation>,
/// Collaboration network
pub collaborators: Vec<String>,
/// Employee embedding vector
pub embedding: Vector,
/// Career progression predictions
pub career_predictions: CareerPredictions,
/// Last updated
pub last_updated: DateTime<Utc>,
}
/// Skill information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Skill {
/// Skill name
pub skill_name: String,
/// Skill category
pub category: SkillCategory,
/// Proficiency level (1-10)
pub proficiency_level: u8,
/// Years of experience
pub years_experience: f64,
/// Skill importance in role
pub role_importance: f64,
/// Market demand score
pub market_demand: f64,
}
/// Skill categories
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum SkillCategory {
Technical,
Leadership,
Communication,
Analytical,
Creative,
Domain,
Language,
Tools,
}
/// Experience levels
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ExperienceLevel {
Junior,
Mid,
Senior,
Lead,
Principal,
Executive,
}
/// Performance metrics for employees
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PerformanceMetrics {
/// Overall performance score (1-10)
pub overall_score: f64,
/// Goal achievement rate
pub goal_achievement_rate: f64,
/// Project completion rate
pub project_completion_rate: f64,
/// Collaboration score
pub collaboration_score: f64,
/// Innovation score
pub innovation_score: f64,
/// Leadership score
pub leadership_score: f64,
}
/// Project participation information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProjectParticipation {
/// Project ID
pub project_id: String,
/// Project name
pub project_name: String,
/// Role in project
pub role: String,
/// Start date
pub start_date: DateTime<Utc>,
/// End date
pub end_date: Option<DateTime<Utc>>,
/// Project outcome
pub outcome: ProjectOutcome,
/// Contribution score
pub contribution_score: f64,
}
/// Project outcomes
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ProjectOutcome {
Successful,
PartiallySuccessful,
Failed,
Cancelled,
Ongoing,
}
/// Career progression predictions
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CareerPredictions {
/// Promotion likelihood (0-1)
pub promotion_likelihood: f64,
/// Predicted next role
pub next_role: String,
/// Skills to develop
pub skills_to_develop: Vec<String>,
/// Career path recommendations
pub career_paths: Vec<String>,
/// Retention risk (0-1)
pub retention_risk: f64,
}
/// Organizational structure
#[derive(Debug, Clone)]
pub struct OrganizationalStructure {
/// Departments
pub departments: HashMap<String, Department>,
/// Teams within departments
pub teams: HashMap<String, Team>,
/// Reporting relationships
pub reporting_structure: HashMap<String, Vec<String>>,
/// Cross-functional projects
pub projects: HashMap<String, Project>,
}
/// Department information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Department {
/// Department ID
pub department_id: String,
/// Department name
pub name: String,
/// Department head
pub head: String,
/// Employees
pub employees: Vec<String>,
/// Teams
pub teams: Vec<String>,
/// Budget
pub budget: f64,
/// Performance metrics
pub performance: DepartmentPerformance,
}
/// Department performance metrics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DepartmentPerformance {
/// Budget utilization
pub budget_utilization: f64,
/// Goal achievement
pub goal_achievement: f64,
/// Employee satisfaction
pub employee_satisfaction: f64,
/// Productivity score
pub productivity_score: f64,
/// Innovation index
pub innovation_index: f64,
}
/// Team information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Team {
/// Team ID
pub team_id: String,
/// Team name
pub name: String,
/// Team lead
pub lead: String,
/// Team members
pub members: Vec<String>,
/// Department
pub department: String,
/// Team skills
pub team_skills: Vec<Skill>,
/// Team performance
pub performance: TeamPerformance,
}
/// Team performance metrics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TeamPerformance {
/// Collaboration score
pub collaboration_score: f64,
/// Delivery performance
pub delivery_performance: f64,
/// Quality metrics
pub quality_score: f64,
/// Innovation score
pub innovation_score: f64,
/// Team satisfaction
pub team_satisfaction: f64,
}
/// Project information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Project {
/// Project ID
pub project_id: String,
/// Project name
pub name: String,
/// Project description
pub description: String,
/// Project manager
pub manager: String,
/// Team members
pub team_members: Vec<String>,
/// Start date
pub start_date: DateTime<Utc>,
/// End date
pub end_date: Option<DateTime<Utc>>,
/// Budget
pub budget: f64,
/// Status
pub status: ProjectStatus,
/// Required skills
pub required_skills: Vec<String>,
/// Performance metrics
pub performance: ProjectPerformance,
}
/// Project status
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ProjectStatus {
Planning,
InProgress,
OnHold,
Completed,
Cancelled,
}
/// Project performance metrics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProjectPerformance {
/// Progress percentage
pub progress_percentage: f64,
/// Budget utilization
pub budget_utilization: f64,
/// Timeline adherence
pub timeline_adherence: f64,
/// Quality score
pub quality_score: f64,
/// Stakeholder satisfaction
pub stakeholder_satisfaction: f64,
}