diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-06 10:31:40 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-06 10:31:40 +0200 |
| commit | 9a9d5c5880095adeb43a045dca638243c8f946e4 (patch) | |
| tree | 86e0d23af339b3139efab15749aaf5b59aa0965b /crates/rocie-client/src/models/product_stub.rs | |
| parent | chore: Initial commit (diff) | |
| download | server-9a9d5c5880095adeb43a045dca638243c8f946e4.zip | |
feat: Provide basic API frame
Diffstat (limited to 'crates/rocie-client/src/models/product_stub.rs')
| -rw-r--r-- | crates/rocie-client/src/models/product_stub.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crates/rocie-client/src/models/product_stub.rs b/crates/rocie-client/src/models/product_stub.rs new file mode 100644 index 0000000..3849c18 --- /dev/null +++ b/crates/rocie-client/src/models/product_stub.rs @@ -0,0 +1,33 @@ +/* + * rocie-server + * + * An enterprise grocery management system + * + * The version of the OpenAPI document: 0.1.0 + * Contact: benedikt.peetz@b-peetz.de + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProductStub { + #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub description: Option<Option<String>>, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "parent", skip_serializing_if = "Option::is_none")] + pub parent: Option<uuid::Uuid>, +} + +impl ProductStub { + pub fn new(name: String) -> ProductStub { + ProductStub { + description: None, + name, + parent: None, + } + } +} + |
