1use crate::Vector;
4use chrono::{DateTime, Utc};
5use serde::{Deserialize, Serialize};
6use std::collections::HashMap;
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct EmployeeEmbedding {
11 pub employee_id: String,
13 pub name: String,
15 pub job_title: String,
17 pub department: String,
19 pub team: String,
21 pub skills: Vec<Skill>,
23 pub experience_level: ExperienceLevel,
25 pub performance_metrics: PerformanceMetrics,
27 pub project_history: Vec<ProjectParticipation>,
29 pub collaborators: Vec<String>,
31 pub embedding: Vector,
33 pub career_predictions: CareerPredictions,
35 pub last_updated: DateTime<Utc>,
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41pub struct Skill {
42 pub skill_name: String,
44 pub category: SkillCategory,
46 pub proficiency_level: u8,
48 pub years_experience: f64,
50 pub role_importance: f64,
52 pub market_demand: f64,
54}
55
56#[derive(Debug, Clone, Serialize, Deserialize)]
58pub enum SkillCategory {
59 Technical,
60 Leadership,
61 Communication,
62 Analytical,
63 Creative,
64 Domain,
65 Language,
66 Tools,
67}
68
69#[derive(Debug, Clone, Serialize, Deserialize)]
71pub enum ExperienceLevel {
72 Junior,
73 Mid,
74 Senior,
75 Lead,
76 Principal,
77 Executive,
78}
79
80#[derive(Debug, Clone, Serialize, Deserialize)]
82pub struct PerformanceMetrics {
83 pub overall_score: f64,
85 pub goal_achievement_rate: f64,
87 pub project_completion_rate: f64,
89 pub collaboration_score: f64,
91 pub innovation_score: f64,
93 pub leadership_score: f64,
95}
96
97#[derive(Debug, Clone, Serialize, Deserialize)]
99pub struct ProjectParticipation {
100 pub project_id: String,
102 pub project_name: String,
104 pub role: String,
106 pub start_date: DateTime<Utc>,
108 pub end_date: Option<DateTime<Utc>>,
110 pub outcome: ProjectOutcome,
112 pub contribution_score: f64,
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118pub enum ProjectOutcome {
119 Successful,
120 PartiallySuccessful,
121 Failed,
122 Cancelled,
123 Ongoing,
124}
125
126#[derive(Debug, Clone, Serialize, Deserialize)]
128pub struct CareerPredictions {
129 pub promotion_likelihood: f64,
131 pub next_role: String,
133 pub skills_to_develop: Vec<String>,
135 pub career_paths: Vec<String>,
137 pub retention_risk: f64,
139}
140
141#[derive(Debug, Clone)]
143pub struct OrganizationalStructure {
144 pub departments: HashMap<String, Department>,
146 pub teams: HashMap<String, Team>,
148 pub reporting_structure: HashMap<String, Vec<String>>,
150 pub projects: HashMap<String, Project>,
152}
153
154#[derive(Debug, Clone, Serialize, Deserialize)]
156pub struct Department {
157 pub department_id: String,
159 pub name: String,
161 pub head: String,
163 pub employees: Vec<String>,
165 pub teams: Vec<String>,
167 pub budget: f64,
169 pub performance: DepartmentPerformance,
171}
172
173#[derive(Debug, Clone, Serialize, Deserialize)]
175pub struct DepartmentPerformance {
176 pub budget_utilization: f64,
178 pub goal_achievement: f64,
180 pub employee_satisfaction: f64,
182 pub productivity_score: f64,
184 pub innovation_index: f64,
186}
187
188#[derive(Debug, Clone, Serialize, Deserialize)]
190pub struct Team {
191 pub team_id: String,
193 pub name: String,
195 pub lead: String,
197 pub members: Vec<String>,
199 pub department: String,
201 pub team_skills: Vec<Skill>,
203 pub performance: TeamPerformance,
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209pub struct TeamPerformance {
210 pub collaboration_score: f64,
212 pub delivery_performance: f64,
214 pub quality_score: f64,
216 pub innovation_score: f64,
218 pub team_satisfaction: f64,
220}
221
222#[derive(Debug, Clone, Serialize, Deserialize)]
224pub struct Project {
225 pub project_id: String,
227 pub name: String,
229 pub description: String,
231 pub manager: String,
233 pub team_members: Vec<String>,
235 pub start_date: DateTime<Utc>,
237 pub end_date: Option<DateTime<Utc>>,
239 pub budget: f64,
241 pub status: ProjectStatus,
243 pub required_skills: Vec<String>,
245 pub performance: ProjectPerformance,
247}
248
249#[derive(Debug, Clone, Serialize, Deserialize)]
251pub enum ProjectStatus {
252 Planning,
253 InProgress,
254 OnHold,
255 Completed,
256 Cancelled,
257}
258
259#[derive(Debug, Clone, Serialize, Deserialize)]
261pub struct ProjectPerformance {
262 pub progress_percentage: f64,
264 pub budget_utilization: f64,
266 pub timeline_adherence: f64,
268 pub quality_score: f64,
270 pub stakeholder_satisfaction: f64,
272}