Issue:
reafactor(storage): Split storage & data models responsibilities

This will serve as a tracking issue for splitting out storage functionality from domain/data models

The objective is to bring more genericity for storage implementations & better representation for payment methods in general

This would end up creating a new crate for storage implementations where in all database layer code is abstracted from the router application & is abstracted over

Resolution:
<think>
PR Context:
- Title: refactor(storage): update crate name to diesel models
- Merged: 2023-07-12T13:27:59Z
- Files changed: 30 files
- Commits: 4 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- rename the storage models crate name to be more apt
- future steps would involve creating a separate crate for data/domain models & splitting the functionality one change at a time

### Additional Changes

- [ ] This PR modifies the API
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** refactor(storage): update crate name to diesel models (#1685)
Files to modify:


**crates/drainer/src/lib.rs**
  Modify existing code

**crates/router/src/configs/settings.rs**
  Modify existing code

**crates/router/src/connector/adyen.rs**
  Modify existing code

**crates/router/src/connector/adyen/transformers.rs**
  Modify existing code

**crates/router/src/connector/cashtocode/transformers.rs**
  Modify existing code

**crates/router/src/connector/checkout.rs**
  Modify existing code

**crates/router/src/connector/cybersource.rs**
  Modify existing code

**crates/router/src/connector/dlocal/transformers.rs**
  Modify existing code

**crates/router/src/connector/dummyconnector.rs**
  Modify existing code

**crates/router/src/connector/dummyconnector/transformers.rs**
  Modify existing code

**crates/router/src/connector/globalpay.rs**
  Modify existing code

**crates/router/src/connector/mollie/transformers.rs**
  Modify existing code

**crates/router/src/connector/multisafepay/transformers.rs**
  Modify existing code

**crates/router/src/connector/nmi/transformers.rs**
  Modify existing code

**crates/router/src/connector/noon/transformers.rs**
  Modify existing code

**crates/router/src/connector/nuvei.rs**
  Modify existing code

**crates/router/src/connector/nuvei/transformers.rs**
  Modify existing code

**crates/router/src/connector/payeezy/transformers.rs**
  Modify existing code

**crates/router/src/connector/paypal.rs**
  Modify existing code

**crates/router/src/connector/rapyd/transformers.rs**
  Modify existing code

**crates/router/src/connector/shift4.rs**
  Modify existing code

**crates/router/src/connector/stripe.rs**
  Modify existing code

**crates/router/src/connector/stripe/transformers.rs**
  Modify existing code

**crates/router/src/connector/trustpay.rs**
  Modify existing code

**crates/router/src/connector/trustpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/utils.rs**
  Modify existing code

**crates/router/src/connector/worldline.rs**
  Modify existing code

**crates/router/src/connector/worldpay.rs**
  Modify existing code

**crates/router/src/connector/worldpay/transformers.rs**
  Modify existing code

**crates/router/src/core/admin.rs**
  Modify existing code

**crates/router/src/core/api_keys.rs**
  Modify existing code

**crates/router/src/core/configs.rs**
  Modify existing code

**crates/router/src/core/disputes.rs**
  Modify existing code

**crates/router/src/core/disputes/transformers.rs**
  Modify existing code

**crates/router/src/core/errors.rs**
  Modify existing code

**crates/router/src/core/files.rs**
  Modify existing code

**crates/router/src/core/files/helpers.rs**
  Modify existing code

**crates/router/src/core/mandate.rs**
  Modify existing code

**crates/router/src/core/payment_methods/cards.rs**
  Modify existing code

**crates/router/src/core/payments.rs**
  Modify existing code

**crates/router/src/core/payments/flows/authorize_flow.rs**
  Modify existing code

**crates/router/src/core/payments/flows/verify_flow.rs**
  Modify existing code

**crates/router/src/core/payments/helpers.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_create.rs**
  Modify existing code

**crates/router/src/core/payments/tokenization.rs**
  Modify existing code

**crates/router/src/core/payments/transformers.rs**
  Modify existing code

**crates/router/src/core/refunds.rs**
  Modify existing code

**crates/router/src/core/refunds/validator.rs**
  Modify existing code

**crates/router/src/core/utils.rs**
  Modify existing code

**crates/router/src/core/webhooks.rs**
  Modify existing code

**crates/router/src/db/address.rs**
  Modify existing code

**crates/router/src/db/configs.rs**
  Modify existing code

**crates/router/src/db/dispute.rs**
  Modify existing code

**crates/router/src/db/events.rs**
  Modify existing code

**crates/router/src/db/mandate.rs**
  Modify existing code

**crates/router/src/db/merchant_connector_account.rs**
  Modify existing code

**crates/router/src/db/merchant_key_store.rs**
  Modify existing code

**crates/router/src/db/payment_attempt.rs**
  Modify existing code

**crates/router/src/db/payment_method.rs**
  Modify existing code

**crates/router/src/db/refund.rs**
  Modify existing code

**crates/router/src/scheduler/workflows/api_key_expiry.rs**
  Modify existing code

**crates/router/src/services.rs**
  Modify existing code

**crates/router/src/types/api.rs**
  Modify existing code

**crates/router/src/types/domain/address.rs**
  Modify existing code

**crates/router/src/types/domain/customer.rs**
  Modify existing code

**crates/router/src/types/domain/merchant_account.rs**
  Modify existing code

**crates/router/src/types/domain/merchant_connector_account.rs**
  Modify existing code

**crates/router/src/types/domain/merchant_key_store.rs**
  Modify existing code

**crates/router/src/types/domain/types.rs**
  Modify existing code

**crates/router/src/types/storage/address.rs**
  Modify existing code

**crates/router/src/types/storage/api_keys.rs**
  Modify existing code

**crates/router/src/types/storage/cards_info.rs**
  Modify existing code

**crates/router/src/types/storage/configs.rs**
  Modify existing code

**crates/router/src/types/storage/connector_response.rs**
  Modify existing code

**crates/router/src/types/storage/customers.rs**
  Modify existing code

**crates/router/src/types/storage/dispute.rs**
  Modify existing code

**crates/router/src/types/storage/enums.rs**
  Modify existing code

**crates/router/src/types/storage/ephemeral_key.rs**
  Modify existing code

**crates/router/src/types/storage/events.rs**
  Modify existing code

**crates/router/src/types/storage/file.rs**
  Modify existing code

**crates/router/src/types/storage/kv.rs**
  Modify existing code

**crates/router/src/types/storage/locker_mock_up.rs**
  Modify existing code

**crates/router/src/types/storage/mandate.rs**
  Modify existing code

**crates/router/src/types/storage/merchant_account.rs**
  Modify existing code

**crates/router/src/types/storage/merchant_connector_account.rs**
  Modify existing code

**crates/router/src/types/storage/payment_attempt.rs**
  Modify existing code

**crates/router/src/types/storage/payment_intent.rs**
  Modify existing code

**crates/router/src/types/storage/payment_method.rs**
  Modify existing code

**crates/router/src/types/storage/process_tracker.rs**
  Modify existing code

**crates/router/src/types/storage/query.rs**
  Modify existing code

**crates/router/src/types/storage/refund.rs**
  Modify existing code

**crates/router/src/types/storage/reverse_lookup.rs**
  Modify existing code

**crates/router/src/types/transformers.rs**
  Modify existing code

**crates/router/src/utils.rs**
  Modify existing code

**crates/router/tests/connectors/airwallex.rs**
  Modify existing code

**crates/router/tests/connectors/authorizedotnet.rs**
  Modify existing code

**crates/router/tests/connectors/bambora.rs**
  Modify existing code

**crates/router/tests/connectors/fiserv.rs**
  Modify existing code

**crates/router/tests/connectors/nexinets.rs**
  Modify existing code

**crates/router/tests/connectors/payeezy.rs**
  Modify existing code

**crates/router/tests/connectors/rapyd.rs**
  Modify existing code

**crates/router/tests/connectors/utils.rs**
  Modify existing code