pub mod axios {
    pub use reqwest::{self, Client as Axios};
}
pub mod log {
    pub use tracing::{debug, error, info, trace, warn};
}
pub mod base64 {
    pub use base64::{engine::general_purpose::STANDARD as BASE64, Engine};
}
pub mod json {
    pub use serde::{Deserialize, Serialize};
    pub use serde_json::Value as JsonValue;
    pub use serde_json::*;
}
#[derive(Debug, json::Deserialize, json::Serialize, Clone)]
#[serde(rename_all = "snake_case")]
pub struct RespData {
    pub key: String,
    pub data: Option<json::JsonValue>,
}

/// 后端 ResData::resp("msg", data) 的包装结构
/// 实际响应格式: {"code": 200, "message": "msg", "data": RespData}
#[derive(Debug, json::Deserialize, Clone)]
pub struct ApiResp<T> {
    pub code: i32,
    pub message: String,
    pub data: T,
}
