use serde::{Deserialize, Serialize};
use ts_rs::TS;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, TS)]
pub struct RunRecord {
pub id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub project_id: Option<String>,
#[serde(default)]
pub kind: String,
#[ts(type = "number")]
pub started_at: i64,
#[ts(type = "number | null")]
pub finished_at: Option<i64>,
pub status: String,
pub triggered_by: String,
pub git_ref: Option<String>,
pub parent_run_id: Option<String>,
#[ts(type = "number | null")]
pub wall_clock_ms: Option<i64>,
#[ts(type = "number")]
pub total_ai_spend_usd_micros: i64,
}