aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rocie-client/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/models')
-rw-r--r--crates/rocie-client/src/models/bar_code.rs27
-rw-r--r--crates/rocie-client/src/models/barcode.rs30
-rw-r--r--crates/rocie-client/src/models/mod.rs8
-rw-r--r--crates/rocie-client/src/models/product.rs36
-rw-r--r--crates/rocie-client/src/models/product_one_of.rs27
-rw-r--r--crates/rocie-client/src/models/product_one_of_1.rs27
-rw-r--r--crates/rocie-client/src/models/product_stub.rs33
-rw-r--r--crates/rocie-client/src/models/unit_amount.rs30
8 files changed, 218 insertions, 0 deletions
diff --git a/crates/rocie-client/src/models/bar_code.rs b/crates/rocie-client/src/models/bar_code.rs
new file mode 100644
index 0000000..c8123a2
--- /dev/null
+++ b/crates/rocie-client/src/models/bar_code.rs
@@ -0,0 +1,27 @@
+/*
+ * 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 BarCode {
+ #[serde(rename = "id")]
+ pub id: i64,
+}
+
+impl BarCode {
+ pub fn new(id: i64) -> BarCode {
+ BarCode {
+ id,
+ }
+ }
+}
+
diff --git a/crates/rocie-client/src/models/barcode.rs b/crates/rocie-client/src/models/barcode.rs
new file mode 100644
index 0000000..7690be2
--- /dev/null
+++ b/crates/rocie-client/src/models/barcode.rs
@@ -0,0 +1,30 @@
+/*
+ * 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 Barcode {
+ #[serde(rename = "amount")]
+ pub amount: Box<models::UnitAmount>,
+ #[serde(rename = "id")]
+ pub id: i32,
+}
+
+impl Barcode {
+ pub fn new(amount: models::UnitAmount, id: i32) -> Barcode {
+ Barcode {
+ amount: Box::new(amount),
+ id,
+ }
+ }
+}
+
diff --git a/crates/rocie-client/src/models/mod.rs b/crates/rocie-client/src/models/mod.rs
new file mode 100644
index 0000000..6c96c01
--- /dev/null
+++ b/crates/rocie-client/src/models/mod.rs
@@ -0,0 +1,8 @@
+pub mod barcode;
+pub use self::barcode::Barcode;
+pub mod product;
+pub use self::product::Product;
+pub mod product_stub;
+pub use self::product_stub::ProductStub;
+pub mod unit_amount;
+pub use self::unit_amount::UnitAmount;
diff --git a/crates/rocie-client/src/models/product.rs b/crates/rocie-client/src/models/product.rs
new file mode 100644
index 0000000..acdc6c6
--- /dev/null
+++ b/crates/rocie-client/src/models/product.rs
@@ -0,0 +1,36 @@
+/*
+ * 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 Product {
+ #[serde(rename = "associated_bar_codes")]
+ pub associated_bar_codes: Vec<models::Barcode>,
+ #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
+ pub description: Option<Option<String>>,
+ #[serde(rename = "id")]
+ pub id: uuid::Uuid,
+ #[serde(rename = "name")]
+ pub name: String,
+}
+
+impl Product {
+ pub fn new(associated_bar_codes: Vec<models::Barcode>, id: uuid::Uuid, name: String) -> Product {
+ Product {
+ associated_bar_codes,
+ description: None,
+ id,
+ name,
+ }
+ }
+}
+
diff --git a/crates/rocie-client/src/models/product_one_of.rs b/crates/rocie-client/src/models/product_one_of.rs
new file mode 100644
index 0000000..399c06b
--- /dev/null
+++ b/crates/rocie-client/src/models/product_one_of.rs
@@ -0,0 +1,27 @@
+/*
+ * 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 ProductOneOf {
+ #[serde(rename = "Mass")]
+ pub mass: i64,
+}
+
+impl ProductOneOf {
+ pub fn new(mass: i64) -> ProductOneOf {
+ ProductOneOf {
+ mass,
+ }
+ }
+}
+
diff --git a/crates/rocie-client/src/models/product_one_of_1.rs b/crates/rocie-client/src/models/product_one_of_1.rs
new file mode 100644
index 0000000..58e033f
--- /dev/null
+++ b/crates/rocie-client/src/models/product_one_of_1.rs
@@ -0,0 +1,27 @@
+/*
+ * 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 ProductOneOf1 {
+ #[serde(rename = "Volume")]
+ pub volume: i64,
+}
+
+impl ProductOneOf1 {
+ pub fn new(volume: i64) -> ProductOneOf1 {
+ ProductOneOf1 {
+ volume,
+ }
+ }
+}
+
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,
+ }
+ }
+}
+
diff --git a/crates/rocie-client/src/models/unit_amount.rs b/crates/rocie-client/src/models/unit_amount.rs
new file mode 100644
index 0000000..038adb0
--- /dev/null
+++ b/crates/rocie-client/src/models/unit_amount.rs
@@ -0,0 +1,30 @@
+/*
+ * 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 UnitAmount {
+ #[serde(rename = "unit")]
+ pub unit: String,
+ #[serde(rename = "value")]
+ pub value: i32,
+}
+
+impl UnitAmount {
+ pub fn new(unit: String, value: i32) -> UnitAmount {
+ UnitAmount {
+ unit,
+ value,
+ }
+ }
+}
+