aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rocie-client/src/models
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-23 08:36:26 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-23 08:36:26 +0200
commit5543c1d2ba00f8379685ab22154caf1ad9f4659d (patch)
tree46518bac5fae927b624c5c533949b1dfcf58921f /crates/rocie-client/src/models
parentbuild(scripts/mk_sqlite_schema.sh): Init (diff)
downloadserver-5543c1d2ba00f8379685ab22154caf1ad9f4659d.zip
chore(crates/rocies-client): Regenerate
Diffstat (limited to 'crates/rocie-client/src/models')
-rw-r--r--crates/rocie-client/src/models/barcode.rs4
-rw-r--r--crates/rocie-client/src/models/mod.rs2
-rw-r--r--crates/rocie-client/src/models/product_amount.rs30
3 files changed, 34 insertions, 2 deletions
diff --git a/crates/rocie-client/src/models/barcode.rs b/crates/rocie-client/src/models/barcode.rs
index 2b1759a..7690be2 100644
--- a/crates/rocie-client/src/models/barcode.rs
+++ b/crates/rocie-client/src/models/barcode.rs
@@ -16,11 +16,11 @@ pub struct Barcode {
#[serde(rename = "amount")]
pub amount: Box<models::UnitAmount>,
#[serde(rename = "id")]
- pub id: i64,
+ pub id: i32,
}
impl Barcode {
- pub fn new(amount: models::UnitAmount, id: i64) -> 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
index 42fecc5..20ed0ff 100644
--- a/crates/rocie-client/src/models/mod.rs
+++ b/crates/rocie-client/src/models/mod.rs
@@ -2,6 +2,8 @@ pub mod barcode;
pub use self::barcode::Barcode;
pub mod product;
pub use self::product::Product;
+pub mod product_amount;
+pub use self::product_amount::ProductAmount;
pub mod product_stub;
pub use self::product_stub::ProductStub;
pub mod unit;
diff --git a/crates/rocie-client/src/models/product_amount.rs b/crates/rocie-client/src/models/product_amount.rs
new file mode 100644
index 0000000..6f1b436
--- /dev/null
+++ b/crates/rocie-client/src/models/product_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 ProductAmount {
+ #[serde(rename = "amount")]
+ pub amount: Box<models::UnitAmount>,
+ #[serde(rename = "product_id")]
+ pub product_id: uuid::Uuid,
+}
+
+impl ProductAmount {
+ pub fn new(amount: models::UnitAmount, product_id: uuid::Uuid) -> ProductAmount {
+ ProductAmount {
+ amount: Box::new(amount),
+ product_id,
+ }
+ }
+}
+