use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::dto::building_response::BuildingResponse;
use crate::dto::floor_response::FloorResponse;
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BuildingWithFloorsResponse {
pub building: BuildingResponse,
#[serde(skip_serializing_if = "Option::is_none")]
pub floors: Option<Vec<FloorResponse>>,
}
// impl CategoryWithFieldsResponse {
// pub fn from_category(c: Category, fs: Vec<Field>) -> CategoryWithFieldsResponse {
// CategoryWithFieldsResponse {
// id: Option::from(c.uuid),
// ver: c.ver,
// name: c.name,
// parent_id: c.parent_id,
// organization: c.organization,
// fields: Option::from(FieldResponse::from_field_list(fs)),
// }
// }
// }