Skip to main content

rocie_client/models/
barcode.rs

1// rocie - An enterprise grocery management system
2//
3// Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6// This file is part of Rocie.
7//
8// You should have received a copy of the License along with this program.
9// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
10
11/*
12 * rocie-server
13 *
14 * An enterprise grocery management system - server
15 *
16 * The version of the OpenAPI document: 0.1.0
17 * Contact: benedikt.peetz@b-peetz.de
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23
24#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
25pub struct Barcode {
26    #[serde(rename = "amount")]
27    pub amount: models::UnitAmount,
28    #[serde(rename = "id")]
29    pub id: models::BarcodeId,
30}
31
32impl Barcode {
33    pub fn new(amount: models::UnitAmount, id: models::BarcodeId) -> Barcode {
34        Barcode { amount, id }
35    }
36}