Geoffrey-rs/geoffrey_models/src/models/parameters/add_item_params.rs

24 lines
516 B
Rust

use crate::models::parameters::GeoffreyParam;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct AddItemParams {
pub item_name: String,
pub price: u32,
pub quantity: u32,
pub shop: String,
}
impl AddItemParams {
pub fn new(item_name: String, price: u32, quantity: u32, shop: String) -> Self {
Self {
item_name,
price,
quantity,
shop,
}
}
}
impl GeoffreyParam for AddItemParams {}