feat(user): generate and delete sample data (#2987)

Co-authored-by: Rachit Naithani <rachit.naithani@juspay.in>
Co-authored-by: Mani Chandra Dulam <mani.dchandra@juspay.in>
This commit is contained in:
Apoorv Dixit
2023-12-01 16:00:25 +05:30
committed by GitHub
parent c4bd47eca9
commit 092ec73b3c
22 changed files with 1152 additions and 19 deletions

View File

@ -0,0 +1,23 @@
use common_enums::{AuthenticationType, CountryAlpha2};
use common_utils::{self};
use time::PrimitiveDateTime;
use crate::enums::Connector;
#[derive(serde::Deserialize, Debug, serde::Serialize)]
pub struct SampleDataRequest {
pub record: Option<usize>,
pub connector: Option<Vec<Connector>>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub start_time: Option<PrimitiveDateTime>,
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub end_time: Option<PrimitiveDateTime>,
// The amount for each sample will be between min_amount and max_amount (in dollars)
pub min_amount: Option<i64>,
pub max_amount: Option<i64>,
pub currency: Option<Vec<common_enums::Currency>>,
pub auth_type: Option<Vec<AuthenticationType>>,
pub business_country: Option<CountryAlpha2>,
pub business_label: Option<String>,
pub profile_id: Option<String>,
}