paymentlib/jsonb/
discount.rs

1
2
3
4
5
6
7
8
9
10
11
12
use serde::{Deserialize, Serialize};
use uuid::Uuid;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct Discount {
    pub id: Uuid,
    pub title: String,
    pub discount_type: String, //todo enum
    pub discount_amount: Option<f64>,
    pub discount_percent: Option<f64>,
}