//! Types for download workflow tests

#[derive(Clone, Debug)]
pub struct ScheduleDownloadRequest {
    pub dataset: String,
    pub symbols: Vec<String>,
    pub start_date: String,
    pub end_date: String,
    pub description: String,
}

impl ScheduleDownloadRequest {
    pub fn new_test_request() -> Self {
        Self {
            dataset: "GLBX.MDP3".to_string(),
            symbols: vec!["ES.FUT".to_string(), "NQ.FUT".to_string()],
            start_date: "2024-01-01".to_string(),
            end_date: "2024-01-02".to_string(),
            description: "Test download".to_string(),
        }
    }
}

#[derive(Debug, Clone)]
pub struct ScheduleDownloadResponse {
    pub job_id: String,
    pub status: i32,
    pub estimated_cost_usd: f64,
}

#[derive(Debug, Clone)]
pub struct DownloadJobDetails {
    pub job_id: String,
    pub status: i32,
    pub dataset: String,
    pub symbols: Vec<String>,
    pub progress_percentage: f32,
    pub completed_at: i64,
    pub minio_path: String,
    pub records_count: u64,
    pub data_quality_score: f64,
    pub invalid_records: u64,
}

#[derive(Debug, Clone)]
pub struct GetDownloadStatusResponse {
    pub job_details: DownloadJobDetails,
}

#[derive(Debug, Clone)]
pub struct ListDownloadJobsResponse {
    pub jobs: Vec<DownloadJobDetails>,
    pub total_count: u32,
    pub page: u32,
    pub page_size: u32,
}

#[derive(Debug, Clone)]
pub struct CancelDownloadResponse {
    pub success: bool,
}
