53 lines
1.3 KiB
Rust
53 lines
1.3 KiB
Rust
|
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,
|
||
|
}
|
||
|
}
|