chemlib/jsonb/
composition_content.rsuse crate::dto::compound_response::CompoundResponse;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Chemical {
pub chemical: Uuid, #[serde(skip_serializing_if = "Option::is_none")]
pub compound: Option<CompoundResponse>, pub flask: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Shelf {
pub chemicals: Vec<Chemical>,
pub index: i32,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Locker {
pub id: Uuid,
pub shelves: Vec<Shelf>,
#[serde(rename(serialize = "type", deserialize = "type"))]
pub l_type: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CompositionContent {
pub lockers: Vec<Locker>,
}