mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
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:
@ -10,7 +10,7 @@ use crate::schema::api_keys;
|
||||
#[diesel(table_name = api_keys, primary_key(key_id), check_for_backend(diesel::pg::Pg))]
|
||||
pub struct ApiKey {
|
||||
pub key_id: String,
|
||||
pub merchant_id: String,
|
||||
pub merchant_id: common_utils::id_type::MerchantId,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub hashed_api_key: HashedApiKey,
|
||||
@ -24,7 +24,7 @@ pub struct ApiKey {
|
||||
#[diesel(table_name = api_keys)]
|
||||
pub struct ApiKeyNew {
|
||||
pub key_id: String,
|
||||
pub merchant_id: String,
|
||||
pub merchant_id: common_utils::id_type::MerchantId,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub hashed_api_key: HashedApiKey,
|
||||
@ -142,7 +142,7 @@ mod diesel_impl {
|
||||
#[derive(Default, Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct ApiKeyExpiryTrackingData {
|
||||
pub key_id: String,
|
||||
pub merchant_id: String,
|
||||
pub merchant_id: common_utils::id_type::MerchantId,
|
||||
pub api_key_name: String,
|
||||
pub prefix: String,
|
||||
pub api_key_expiry: Option<PrimitiveDateTime>,
|
||||
|
||||
Reference in New Issue
Block a user