mediclib/jsonb/
limit.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

use serde::{Deserialize, Serialize};
use uuid::Uuid;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(rename_all = "camelCase")]
pub struct Limit {
    pub id: Uuid,
    pub medication: Uuid,
    pub low_limit: f32,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub high_limit: Option<f32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub notice_limit: Option<f32>
}