use toasty::Model;
#[derive(Debug, Clone, Model)]
#[table = "tool_invocation_metric"]
pub struct ToolInvocationMetric {
#[key]
#[auto]
pub id: u64,
pub session_id: String,
pub project_id: Option<u64>,
pub tool_name: String,
/// Tokens of the response as sent.
pub payload_tokens: u64,
/// Retired: the old whole-file-read estimate. Written as 0, kept so existing databases stay valid.
pub estimated_naive_tokens: u64,
/// Retired with `estimated_naive_tokens`.
pub tokens_saved: u64,
/// The answer told the agent there is more (cut at the budget or a page with a continuation).
pub truncated: bool,
pub execution_duration_ms: u32,
pub created_at: String,
}