use serde::{Deserialize, Serialize};
use uuid::Uuid;

use crate::extraction::MemoryType;

#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct SearchFilters {
    pub user_id: Option<Uuid>,
    pub conversation_id: Option<Uuid>,
    pub memory_type: Option<MemoryType>,
    pub active_only: bool,
}

#[derive(Debug, Clone, Serialize)]
pub struct MemoryMatch {
    pub id: Uuid,
    pub text: String,
    #[serde(rename = "type")]
    pub memory_type: MemoryType,
    pub score: f32,
    pub importance: f32,
    pub occurred_at: Option<String>,
    pub connections: Vec<Uuid>,
}

#[derive(Debug, Clone, Serialize)]
pub struct SearchResult {
    pub query: String,
    pub total: usize,
    pub results: Vec<MemoryMatch>,
}
