refactor(payment_attempt_v2): add payment attempt v2 domain and diesel models (#6027)

Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-09-27 18:52:40 +05:30
committed by GitHub
parent 354f5306e7
commit c7bb9ccda3
56 changed files with 2643 additions and 2050 deletions

View File

@ -329,7 +329,7 @@ impl UniqueConstraints for diesel_models::Address {
}
}
#[cfg(all(feature = "v2", feature = "payment_v2"))]
#[cfg(feature = "v2")]
impl UniqueConstraints for diesel_models::PaymentIntent {
fn unique_constraints(&self) -> Vec<String> {
vec![self.id.get_string_repr().to_owned()]
@ -340,7 +340,7 @@ impl UniqueConstraints for diesel_models::PaymentIntent {
}
}
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "payment_v2")))]
#[cfg(feature = "v1")]
impl UniqueConstraints for diesel_models::PaymentIntent {
#[cfg(feature = "v1")]
fn unique_constraints(&self) -> Vec<String> {
@ -361,6 +361,7 @@ impl UniqueConstraints for diesel_models::PaymentIntent {
}
}
#[cfg(feature = "v1")]
impl UniqueConstraints for diesel_models::PaymentAttempt {
fn unique_constraints(&self) -> Vec<String> {
vec![format!(