use datasynth_core::models::banking::AmlTypology;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NetworkContext {
pub network_id: String,
pub network_role: NetworkRole,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub co_occurring_typologies: Vec<AmlTypology>,
pub network_size: u32,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum NetworkRole {
Coordinator,
Smurf,
Middleman,
CashOut,
ShellEntity,
Recruiter,
Beneficiary,
}
impl NetworkRole {
pub fn risk_weight(&self) -> f64 {
match self {
Self::Coordinator => 2.0,
Self::Recruiter => 1.8,
Self::CashOut => 1.5,
Self::ShellEntity => 1.4,
Self::Beneficiary => 1.3,
Self::Middleman => 1.2,
Self::Smurf => 1.0,
}
}
}