mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-04 22:19:10 +08:00
feat(router): Add Smart Routing to route payments efficiently (#2665)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: shashank_attarde <shashank.attarde@juspay.in> Co-authored-by: Aprabhat19 <amishaprabhat@gmail.com> Co-authored-by: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com>
This commit is contained in:
37
crates/diesel_models/src/routing_algorithm.rs
Normal file
37
crates/diesel_models/src/routing_algorithm.rs
Normal file
@ -0,0 +1,37 @@
|
||||
use diesel::{Identifiable, Insertable, Queryable};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{enums, schema::routing_algorithm};
|
||||
|
||||
#[derive(Clone, Debug, Identifiable, Insertable, Queryable, Serialize, Deserialize)]
|
||||
#[diesel(table_name = routing_algorithm, primary_key(algorithm_id))]
|
||||
pub struct RoutingAlgorithm {
|
||||
pub algorithm_id: String,
|
||||
pub profile_id: String,
|
||||
pub merchant_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
pub algorithm_data: serde_json::Value,
|
||||
pub created_at: time::PrimitiveDateTime,
|
||||
pub modified_at: time::PrimitiveDateTime,
|
||||
}
|
||||
|
||||
pub struct RoutingAlgorithmMetadata {
|
||||
pub algorithm_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
pub created_at: time::PrimitiveDateTime,
|
||||
pub modified_at: time::PrimitiveDateTime,
|
||||
}
|
||||
|
||||
pub struct RoutingProfileMetadata {
|
||||
pub profile_id: String,
|
||||
pub algorithm_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
pub created_at: time::PrimitiveDateTime,
|
||||
pub modified_at: time::PrimitiveDateTime,
|
||||
}
|
||||
Reference in New Issue
Block a user