use crate::wire::OperationCode;
use rust_decimal::Decimal;
use serde::Serialize;
use super::{EmptyResponse, Operation};
#[derive(Debug, Clone, Serialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub struct CashInOutRequest {
#[serde(with = "rust_decimal::serde::float")]
#[cfg_attr(feature = "schema", schemars(with = "f64"))]
pub amount: Decimal,
#[serde(rename = "isCashIn")]
pub is_cash_in: bool,
#[serde(rename = "cashierId", skip_serializing_if = "Option::is_none")]
pub cashier_id: Option<u32>,
#[serde(default)]
pub description: String,
}
impl Operation for CashInOutRequest {
const CODE: OperationCode = OperationCode::CashInOut;
type Response = EmptyResponse;
}