use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::FromRow;
use uuid::Uuid;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FromRow)]
pub struct AgentToolCallLogModel {
    pub id: Uuid,
    pub invocation: Option<Uuid>,
    pub session: Uuid,
    pub conversation: Option<Uuid>,
    pub message: Option<Uuid>,
    pub tool_call_id: Option<String>,
    pub tool_name: String,
    pub arguments: Option<String>,
    pub result: Option<String>,
    pub error: Option<String>,
    pub status: String,
    pub started_at: DateTime<Utc>,
    pub finished_at: Option<DateTime<Utc>>,
    pub latency_ms: Option<i64>,
}
