artifacts/models/
drop_schema.rs

1use 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 DropSchema {
7    /// The code of the item.
8    #[serde(rename = "code")]
9    pub code: String,
10    /// The quantity of the item.
11    #[serde(rename = "quantity")]
12    pub quantity: i32,
13}
14
15impl DropSchema {
16    pub fn new(code: String, quantity: i32) -> DropSchema {
17        DropSchema { code, quantity }
18    }
19}