Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(customer): refactor customer db with storage utils and move trait to domain_models and impl to storage_model #7538

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

jagan-jaya
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Move the Customer db to storage_impl and its interface to hyperswitch_domain_model

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

As part of Payment method crate seperation, customer DB is required in payment methods so moving it out from router

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

Copy link

semanticdiff-com bot commented Mar 17, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments.rs  82% smaller
  crates/storage_impl/src/utils.rs  77% smaller
  crates/router/src/events.rs  75% smaller
  crates/storage_impl/src/mock_db/payout_attempt.rs  72% smaller
  crates/storage_impl/src/payouts/payout_attempt.rs  69% smaller
  crates/storage_impl/src/mock_db/payouts.rs  59% smaller
  crates/router/src/core/errors.rs  58% smaller
  crates/storage_impl/src/payouts/payouts.rs  50% smaller
  crates/storage_impl/src/mock_db/payment_attempt.rs  50% smaller
  crates/storage_impl/src/payment_method.rs  29% smaller
  crates/storage_impl/src/database/store.rs  26% smaller
  crates/router/src/core/errors/utils.rs  16% smaller
  crates/storage_impl/src/kv_router_store.rs  12% smaller
  crates/payment_methods/src/state.rs  5% smaller
  crates/storage_impl/src/lookup.rs  3% smaller
  crates/hyperswitch_domain_models/src/customer.rs  2% smaller
  crates/router/src/db/user/sample_data.rs  2% smaller
  crates/storage_impl/src/payments/payment_attempt.rs  1% smaller
  crates/router/src/services.rs  1% smaller
  crates/storage_impl/src/customers.rs  1% smaller
  crates/router/src/db/customers.rs  1% smaller
  crates/analytics/src/opensearch.rs  0% smaller
  crates/hyperswitch_domain_models/src/errors.rs  0% smaller
  crates/hyperswitch_domain_models/src/payment_methods.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments/payment_attempt.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments/payment_intent.rs  0% smaller
  crates/hyperswitch_domain_models/src/payouts/payout_attempt.rs  0% smaller
  crates/hyperswitch_domain_models/src/payouts/payouts.rs  0% smaller
  crates/router/src/core/errors/user/sample_data.rs  0% smaller
  crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs  0% smaller
  crates/router/src/core/payments/helpers.rs  0% smaller
  crates/router/src/core/payments/operations/payment_status.rs  0% smaller
  crates/router/src/core/payouts/helpers.rs  0% smaller
  crates/router/src/core/payouts/validator.rs  0% smaller
  crates/router/src/db.rs  0% smaller
  crates/router/src/db/kafka_store.rs  0% smaller
  crates/storage_impl/src/errors.rs  0% smaller
  crates/storage_impl/src/lib.rs  0% smaller
  crates/storage_impl/src/mock_db.rs  0% smaller
  crates/storage_impl/src/mock_db/payment_intent.rs  0% smaller
  crates/storage_impl/src/payments/payment_intent.rs  0% smaller

@jagan-jaya jagan-jaya self-assigned this Mar 17, 2025
@jagan-jaya jagan-jaya changed the title Refactor customer db refactor(customer): refactor customer db with storage utils and move trait to domain_models and impl to storage_model Mar 18, 2025
Base automatically changed from refactor-storage-error to main March 21, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant