diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs index 423d1963e7..296c3b4527 100644 --- a/crates/router/src/core/admin.rs +++ b/crates/router/src/core/admin.rs @@ -414,6 +414,8 @@ pub async fn create_payment_connector( business_country, business_label, business_sub_label: req.business_sub_label, + created_at: common_utils::date_time::now(), + modified_at: common_utils::date_time::now(), }; let mca = store diff --git a/crates/storage_models/src/merchant_connector_account.rs b/crates/storage_models/src/merchant_connector_account.rs index 4dbbd8864e..886e888372 100644 --- a/crates/storage_models/src/merchant_connector_account.rs +++ b/crates/storage_models/src/merchant_connector_account.rs @@ -37,7 +37,7 @@ pub struct MerchantConnectorAccount { pub modified_at: time::PrimitiveDateTime, } -#[derive(Clone, Debug, Default, Insertable, router_derive::DebugAsDisplay)] +#[derive(Clone, Debug, Insertable, router_derive::DebugAsDisplay)] #[diesel(table_name = merchant_connector_account)] pub struct MerchantConnectorAccountNew { pub merchant_id: Option, @@ -54,6 +54,8 @@ pub struct MerchantConnectorAccountNew { pub business_country: storage_enums::CountryCode, pub business_label: String, pub business_sub_label: Option, + pub created_at: time::PrimitiveDateTime, + pub modified_at: time::PrimitiveDateTime, } #[derive(Debug)] @@ -70,7 +72,7 @@ pub enum MerchantConnectorAccountUpdate { frm_configs: Option>, }, } -#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)] +#[derive(Clone, Debug, AsChangeset, router_derive::DebugAsDisplay)] #[diesel(table_name = merchant_connector_account)] pub struct MerchantConnectorAccountUpdateInternal { merchant_id: Option, @@ -82,7 +84,7 @@ pub struct MerchantConnectorAccountUpdateInternal { payment_methods_enabled: Option>, metadata: Option, frm_configs: Option>, - modified_at: Option, + modified_at: time::PrimitiveDateTime, } impl From for MerchantConnectorAccountUpdateInternal { @@ -108,7 +110,7 @@ impl From for MerchantConnectorAccountUpdateInte payment_methods_enabled, metadata, frm_configs, - modified_at: Some(common_utils::date_time::now()), + modified_at: common_utils::date_time::now(), }, } }