bazzar/crates/channels/src/stocks/product_variant.rs

53 lines
1.3 KiB
Rust
Raw Normal View History

2022-11-07 16:28:51 +01:00
pub mod create_product_variant {
use model::v2::*;
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Input {
pub product_id: ProductId,
pub name: ProductName,
pub short_description: ProductShortDesc,
pub long_description: ProductLongDesc,
pub price: Price,
}
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Output {
pub product_variant: ProductVariant,
}
}
pub mod update_product_variant {
use model::v2::*;
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Input {
pub id: ProductVariantId,
pub product_id: ProductId,
pub name: ProductName,
pub short_description: ProductShortDesc,
pub long_description: ProductLongDesc,
pub price: Price,
}
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Output {
pub product_variant: ProductVariant,
}
}
pub mod delete_product_variant {
use model::v2::*;
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Input {
pub product_id: ProductId,
pub product_variant_id: ProductVariantId,
}
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Output {
pub product_id: ProductId,
pub product_variant_id: ProductVariantId,
}
}