mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-05 06:26:45 +08:00
feat(routing): add domain type for Routing id (#5733)
Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use common_utils::id_type;
|
||||
use diesel::{Identifiable, Insertable, Queryable, Selectable};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@ -6,9 +7,9 @@ use crate::{enums, schema::routing_algorithm};
|
||||
#[derive(Clone, Debug, Identifiable, Insertable, Queryable, Selectable, Serialize, Deserialize)]
|
||||
#[diesel(table_name = routing_algorithm, primary_key(algorithm_id), check_for_backend(diesel::pg::Pg))]
|
||||
pub struct RoutingAlgorithm {
|
||||
pub algorithm_id: String,
|
||||
pub profile_id: common_utils::id_type::ProfileId,
|
||||
pub merchant_id: common_utils::id_type::MerchantId,
|
||||
pub algorithm_id: id_type::RoutingId,
|
||||
pub profile_id: id_type::ProfileId,
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
@ -19,7 +20,7 @@ pub struct RoutingAlgorithm {
|
||||
}
|
||||
|
||||
pub struct RoutingAlgorithmMetadata {
|
||||
pub algorithm_id: String,
|
||||
pub algorithm_id: id_type::RoutingId,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
@ -29,8 +30,8 @@ pub struct RoutingAlgorithmMetadata {
|
||||
}
|
||||
|
||||
pub struct RoutingProfileMetadata {
|
||||
pub profile_id: common_utils::id_type::ProfileId,
|
||||
pub algorithm_id: String,
|
||||
pub profile_id: id_type::ProfileId,
|
||||
pub algorithm_id: id_type::RoutingId,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub kind: enums::RoutingAlgorithmKind,
|
||||
|
||||
Reference in New Issue
Block a user