use std::collections::HashMap;
use serde::{Deserialize, Serialize};
#[non_exhaustive]
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToResponse, utoipa::ToSchema)]
#[serde(tag = "type", content = "summary", rename_all = "snake_case")]
#[schema(rename_all = "snake_case")]
pub enum ListSummary {
Databases(Vec<String>),
Tables(Vec<TableSummary>),
Paths(Vec<String>),
Files(Vec<TableSummary>),
}
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema, utoipa::ToResponse)]
pub struct ConnectionDetailsResponse {
pub connections: HashMap<String, ListSummary>,
}
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToResponse, utoipa::ToSchema)]
pub struct TableSummary {
pub name: String,
pub rows: Option<u64>,
pub size_bytes: Option<u64>,
}