artifacts/models/
simple_item_schema.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct SimpleItemSchema {
7 #[serde(rename = "code")]
9 pub code: String,
10 #[serde(rename = "quantity")]
12 pub quantity: u32,
13}
14
15impl SimpleItemSchema {
16 pub fn new(code: String, quantity: u32) -> SimpleItemSchema {
17 SimpleItemSchema { code, quantity }
18 }
19}