//! 想法实体与评分类型 — 供 scoring/adversarial/promotion 共享

use serde::{Deserialize, Serialize};

use df_types::types::{IdeaId, Priority};

/// 想法实体
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Idea {
    /// 唯一 ID
    pub id: IdeaId,
    /// 标题
    pub title: String,
    /// 详细描述
    pub description: String,
    /// 当前状态
    pub status: df_types::types::IdeaStatus,
    /// 优先级
    pub priority: Priority,
    /// 评分
    pub scores: Option<IdeaScores>,
    /// 标签
    pub tags: Vec<String>,
    /// 来源
    pub source: Option<String>,
    /// 关联的想法 ID
    pub related_ids: Vec<IdeaId>,
    /// 创建时间
    pub created_at: chrono::DateTime<chrono::Utc>,
    /// 更新时间
    pub updated_at: chrono::DateTime<chrono::Utc>,
}

/// 想法评分详情
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IdeaScores {
    /// 可行性评分 (0-10)
    pub feasibility: f64,
    /// 影响力评分 (0-10)
    pub impact: f64,
    /// 紧急度评分 (0-10)
    pub urgency: f64,
    /// 综合评分 (加权平均)
    pub overall: f64,
}
