use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::storage::sql::{mk_id, unit::UnitId}; /// An unit property describes a property that can be measured by units. /// For example velocity, mass or volume. #[derive(ToSchema, Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Serialize, Deserialize)] pub(crate) struct UnitProperty { /// The unique ID for this unit property. pub(crate) id: UnitPropertyId, /// The user-displayed name of this property. pub(crate) name: String, /// The units with are measuring this property. pub(crate) units: Vec, /// An description of this property. #[schema(nullable = false)] pub(crate) description: Option, } mk_id!(UnitPropertyId and UnitPropertyIdStub);