use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use utoipa::ToSchema;
#[derive(Debug, ToSchema)]
#[allow(dead_code)]
pub struct OntologyUploadMultipart {
pub ontology_key: String,
#[schema(format = "binary")]
pub ontology_file: Vec<u8>,
pub description: Option<String>,
}
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct OntologyMetadataDTO {
pub ontology_key: String,
pub filename: String,
pub size_bytes: u64,
pub uploaded_at: String,
pub description: Option<String>,
}
#[derive(Debug, Serialize, ToSchema)]
pub struct OntologyUploadResponseDTO {
pub uploaded_ontologies: Vec<OntologyMetadataDTO>,
}
pub type OntologyListResponseDTO = BTreeMap<String, OntologyListEntryDTO>;
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct OntologyListEntryDTO {
pub filename: String,
pub size_bytes: u64,
pub uploaded_at: String,
pub description: Option<String>,
}
#[derive(Debug, Serialize, ToSchema)]
pub struct OntologyErrorResponseDTO {
pub error: String,
}