about summary refs log tree commit diff stats
path: root/crates/rocie-client/src/models/product.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/models/product.rs')
-rw-r--r--crates/rocie-client/src/models/product.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/rocie-client/src/models/product.rs b/crates/rocie-client/src/models/product.rs
index 251046c..2ab9445 100644
--- a/crates/rocie-client/src/models/product.rs
+++ b/crates/rocie-client/src/models/product.rs
@@ -18,14 +18,17 @@ pub struct Product {
     #[serde(rename = "associated_bar_codes")]
     pub associated_bar_codes: Vec<models::Barcode>,
     /// An optional description of this product.
-    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
-    pub description: Option<Option<String>>,
+    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
+    pub description: Option<String>,
     /// The id of the product.
     #[serde(rename = "id")]
     pub id: models::ProductId,
     /// The name of the product.  This should be globally unique, to make searching easier for the user.
     #[serde(rename = "name")]
     pub name: String,
+    /// The parent this product has.  This is effectively it's anchor in the product DAG.
+    #[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
+    pub parent: Option<models::ProductParentId>,
     /// The property this product is measured in.  (This is probably always either Mass, Volume or Quantity).
     #[serde(rename = "unit_property")]
     pub unit_property: models::UnitPropertyId,
@@ -39,6 +42,7 @@ impl Product {
             description: None,
             id,
             name,
+            parent: None,
             unit_property,
         }
     }