mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(mandate_kv): add kv support for mandate (#4275)
Co-authored-by: Akshay S <akshay.s@Akshay-Subramanian-D66TQ6D97K.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -12,6 +12,7 @@ pub mod customers;
|
||||
pub mod database;
|
||||
pub mod errors;
|
||||
mod lookup;
|
||||
pub mod mandate;
|
||||
pub mod metrics;
|
||||
pub mod mock_db;
|
||||
pub mod payment_method;
|
||||
@ -372,6 +373,15 @@ impl UniqueConstraints for diesel_models::PaymentMethod {
|
||||
}
|
||||
}
|
||||
|
||||
impl UniqueConstraints for diesel_models::Mandate {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!("mand_{}_{}", self.merchant_id, self.mandate_id)]
|
||||
}
|
||||
fn table_name(&self) -> &str {
|
||||
"Mandate"
|
||||
}
|
||||
}
|
||||
|
||||
impl UniqueConstraints for diesel_models::Customer {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!(
|
||||
|
||||
Reference in New Issue
Block a user