use crate::enterprise_knowledge_product::CategoryPerformance;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Debug, Clone)]
pub struct RecommendationEngine {
pub engine_type: RecommendationEngineType,
pub parameters: HashMap<String, f64>,
pub performance: RecommendationPerformance,
pub last_update: DateTime<Utc>,
}
#[derive(Debug, Clone)]
pub enum RecommendationEngineType {
CollaborativeFiltering,
ContentBased,
MatrixFactorization,
DeepLearning,
Hybrid,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RecommendationPerformance {
pub precision_at_k: HashMap<u32, f64>,
pub recall_at_k: HashMap<u32, f64>,
pub ndcg_scores: HashMap<u32, f64>,
pub click_through_rate: f64,
pub conversion_rate: f64,
pub revenue_impact: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MarketAnalysis {
pub category_performance: HashMap<String, CategoryPerformance>,
pub trending_products: Vec<String>,
pub segment_distribution: HashMap<String, u32>,
pub market_opportunities: Vec<String>,
pub competitive_landscape: HashMap<String, f64>,
pub forecast: HashMap<String, f64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EnterpriseMetrics {
pub total_products: usize,
pub total_employees: usize,
pub total_customers: usize,
pub total_revenue: f64,
pub avg_customer_satisfaction: f64,
pub employee_engagement: f64,
pub organizational_efficiency: f64,
pub innovation_index: f64,
pub top_products: Vec<String>,
pub top_employees: Vec<String>,
pub high_value_customers: Vec<String>,
}