refactor(merchant_id): create domain type for merchant_id (#5408)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-07-24 19:18:25 +05:30
committed by GitHub
parent e18ea7a7ba
commit 7068fbfbe2
406 changed files with 3168 additions and 2633 deletions

View File

@ -1,4 +1,4 @@
use common_utils::{id_type, pii, types::MinorUnit};
use common_utils::{pii, types::MinorUnit};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use serde::{self, Deserialize, Serialize};
use time::PrimitiveDateTime;
@ -12,8 +12,8 @@ use crate::{enums as storage_enums, schema::payouts};
#[diesel(table_name = payouts, primary_key(payout_id), check_for_backend(diesel::pg::Pg))]
pub struct Payouts {
pub payout_id: String,
pub merchant_id: String,
pub customer_id: id_type::CustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: common_utils::id_type::CustomerId,
pub address_id: String,
pub payout_type: Option<storage_enums::PayoutType>,
pub payout_method_id: Option<String>,
@ -53,8 +53,8 @@ pub struct Payouts {
#[diesel(table_name = payouts)]
pub struct PayoutsNew {
pub payout_id: String,
pub merchant_id: String,
pub customer_id: id_type::CustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: common_utils::id_type::CustomerId,
pub address_id: String,
pub payout_type: Option<storage_enums::PayoutType>,
pub payout_method_id: Option<String>,