use std::path::PathBuf;
use serde::Deserialize;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "lowercase")]
#[non_exhaustive]
pub enum ExportFormat {
Csv,
Xlsx,
Parquet,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(default)]
pub struct ExportConfig {
pub csv_delimiter: char,
pub csv_include_bom: bool,
pub xlsx_max_rows: u64,
pub parquet_max_rows: u64,
pub xlsx_temp_dir: Option<PathBuf>,
pub max_concurrent_xlsx: usize,
pub export_formats: Vec<ExportFormat>,
}
impl Default for ExportConfig {
fn default() -> Self {
Self {
csv_delimiter: ',',
csv_include_bom: true,
xlsx_max_rows: 100_000,
parquet_max_rows: 1_000_000,
xlsx_temp_dir: None,
max_concurrent_xlsx: 10,
export_formats: Vec::new(),
}
}
}