use crate::models::{TimingReport, TlsReport};

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProbeStatus {
    Succeeded,
    Failed,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct NewProbeResult {
    pub target: String,
    pub request_path: String,
    pub report: TimingReport,
    pub status: ProbeStatus,
    pub response_status_code: Option<u16>,
    pub response_status_text: Option<String>,
    pub response_bytes: Option<u64>,
    pub error_message: Option<String>,
    pub tls: Option<TlsReport>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ProbeResult {
    pub id: i64,
    pub target: String,
    pub request_path: String,
    pub report: TimingReport,
    pub status: ProbeStatus,
    pub response_status_code: Option<u16>,
    pub response_status_text: Option<String>,
    pub response_bytes: Option<u64>,
    pub error_message: Option<String>,
    pub tls: Option<TlsReport>,
    pub created_at_ms: i64,
}
