diff --git a/js/consumer/selly.go b/js/consumer/selly.go index 103d030..9d9d7d3 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -2,13 +2,15 @@ package jsconsumer // Selly ... var Selly = struct { - PushNotification string - UpdateSellerAffiliateStatistic string - CheckAnDInsertCashflowBySeller string - SubscriberTopic string + PushNotification string + UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string + SubscriberTopic string + UpdateSellerSavingCampaignStatistic string }{ - PushNotification: "PULL_PUSH_NOTIFICATION", - UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC", - CheckAnDInsertCashflowBySeller: "PULL_CHECK_AND_INSERT_CASHFLOW_BY_SELLER", - SubscriberTopic: "PULL_SUBSCRIBER_TOPIC", + PushNotification: "PULL_PUSH_NOTIFICATION", + UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC", + CheckAnDInsertCashflowBySeller: "PULL_CHECK_AND_INSERT_CASHFLOW_BY_SELLER", + SubscriberTopic: "PULL_SUBSCRIBER_TOPIC", + UpdateSellerSavingCampaignStatistic: "PULL_UPDATE_SELLER_SAVING_CAMPAIGN_STATISTIC", } diff --git a/js/model/selly.go b/js/model/selly.go index ed1c1c9..21c4595 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -78,3 +78,15 @@ type SubscriberNotificationTopic struct { DeviceId string `json:"deviceId"` FCMToken string `json:"fcmToken"` } + +// PayloadUpdateSellerSavingCampaignStatistic ... +type PayloadUpdateSellerSavingCampaignStatistic struct { + SellerID string `json:"sellerId"` + Statistic SellerSavingCampaignStatistic `json:"statistic"` +} + +// SellerSavingCampaignStatistic ... +type SellerSavingCampaignStatistic struct { + SavingCampaignCashPending float64 `json:"savingCampaignCashPending"` + SavingCampaignCashCompleted float64 `json:"savingCampaignCashCompleted"` +} diff --git a/js/subject/selly.go b/js/subject/selly.go index 668f249..9065251 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -11,13 +11,15 @@ func getSellyValue(val string) string { // Selly ... var Selly = struct { - PushNotification string - UpdateSellerAffiliateStatistic string - CheckAnDInsertCashflowBySeller string - SubscriberTopic string + PushNotification string + UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string + SubscriberTopic string + UpdateSellerSavingCampaignStatistic string }{ - PushNotification: getSellyValue("push_notifications"), - UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"), - CheckAnDInsertCashflowBySeller: getSellyValue("check_and_insert_cashflow_statistic"), - SubscriberTopic: getSellyValue("subscriber_topic"), + PushNotification: getSellyValue("push_notifications"), + UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"), + CheckAnDInsertCashflowBySeller: getSellyValue("check_and_insert_cashflow_statistic"), + SubscriberTopic: getSellyValue("subscriber_topic"), + UpdateSellerSavingCampaignStatistic: getSellyValue("update_seller_saving_campaign_statistic"), }