diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:35:35 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-28 16:35:35 +0100 |
| commit | a479685602347b473d74f99f492e5e85d7afde94 (patch) | |
| tree | ed7eea0fbab0a9f33d959345719d638271539da0 /crates/rocie-client/src/models/product.rs | |
| parent | feat(crates/rocie-cli): Add support for product parents (diff) | |
| download | server-a479685602347b473d74f99f492e5e85d7afde94.zip | |
chore(crates/rocie-client): Re-generate
Diffstat (limited to 'crates/rocie-client/src/models/product.rs')
| -rw-r--r-- | crates/rocie-client/src/models/product.rs | 8 |
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, } } |
