use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DiscountCalculator;
impl DiscountCalculator {
pub fn apply(total: Decimal, diskon: Decimal) -> Decimal {
tracing::debug!(
event = "apply_discount",
total = %total,
diskon = %diskon,
"Applying discount"
);
total + diskon
}
}