Use tenant_id type for better type safety
To implement this **search_filter** feature, you'll need to modify these architectural layers:


**1. Database Layer (Queries & Schema)**
   - `crates/diesel_models/src/user/theme.rs`
   - `crates/diesel_models/src/user_role.rs`

**2. Core Business Logic**
   - `crates/router/src/core/payment_methods/transformers.rs`
   - `crates/router/src/core/routing/helpers.rs`
   - `crates/router/src/core/user.rs`

**3. External Connector Integration**
   - `crates/router/src/db/merchant_connector_account.rs`
   - `crates/router/tests/connectors/aci.rs`
   - `crates/router/tests/connectors/utils.rs`

**4. Type Definitions**
   - `crates/common_utils/src/types/theme.rs`
   - `crates/router/src/types/domain/user.rs`

**5. Utils**
   - `crates/common_utils/src/id_type.rs`
   - `crates/common_utils/src/id_type/organization.rs`
   - `crates/common_utils/src/id_type/tenant.rs`
   - ... and 1 more files

**6. Tests**
   - `crates/router/tests/cache.rs`
   - `crates/router/tests/payments.rs`
   - `crates/router/tests/payments2.rs`
   - ... and 1 more files

**7. Configuration Files**
   - `crates/router/src/configs/settings.rs`

**8. Other**
   - `crates/drainer/src/handler.rs`
   - `crates/drainer/src/health_check.rs`
   - `crates/drainer/src/lib.rs`
   - ... and 10 more files

**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (14 changes)
- Extend existing types with new fields (46 changes)
- Add conditional logic for feature flags or filtering (1 changes)

**Detailed Identifier Changes:**


Commit c9df7b05:
Files to modify:


**crates/common_utils/src/id_type.rs**
  Modify existing code

**crates/common_utils/src/id_type/organization.rs**
  Modify existing code

**crates/common_utils/src/id_type/tenant.rs**
  Modify existing code

**crates/common_utils/src/types/theme.rs**
  Modify existing code

**crates/diesel_models/src/user/theme.rs**
  Modify existing code

**crates/diesel_models/src/user_role.rs**
  Modify existing code

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

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

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

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

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

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

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

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

**crates/router/src/db/events.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/routes/app.rs**
  Modify existing code

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

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

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

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

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

**crates/router/tests/cache.rs**
  Modify existing code

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

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

**crates/router/tests/payments.rs**
  Modify existing code

**crates/router/tests/payments2.rs**
  Modify existing code

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

**crates/scheduler/src/consumer.rs**
  Modify existing code

**crates/scheduler/src/producer.rs**
  Modify existing code

**crates/scheduler/src/scheduler.rs**
  Modify existing code
{"pr_number": 6643, "pr_title": "refactor(tenant): use tenant id type", "merged_at": "2024-11-26T09:12:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/user/theme.rs", "crates/diesel_models/src/user_role.rs"], "core_business": ["crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/routing/helpers.rs", "crates/router/src/core/user.rs"], "connectors": ["crates/router/src/db/merchant_connector_account.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/common_utils/src/types/theme.rs", "crates/router/src/types/domain/user.rs"], "utils": ["crates/common_utils/src/id_type.rs", "crates/common_utils/src/id_type/organization.rs", "crates/common_utils/src/id_type/tenant.rs", "crates/router/src/utils/user.rs"], "tests": ["crates/router/tests/cache.rs", "crates/router/tests/payments.rs", "crates/router/tests/payments2.rs", "crates/router/tests/services.rs"], "config": ["crates/router/src/configs/settings.rs"], "other": ["crates/drainer/src/handler.rs", "crates/drainer/src/health_check.rs", "crates/drainer/src/lib.rs", "crates/drainer/src/settings.rs", "crates/router/src/db/events.rs", "crates/router/src/db/merchant_key_store.rs", "crates/router/src/routes/app.rs", "crates/router/src/services/api.rs", "crates/router/src/services/authentication.rs", "crates/router/src/services/authorization.rs", "crates/scheduler/src/consumer.rs", "crates/scheduler/src/producer.rs", "crates/scheduler/src/scheduler.rs"]}, "change_types": {"structs_added": 2, "functions_added": 14, "fields_added": 46, "imports_added": 10, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}