diff --git a/js/consumer/selly.go b/js/consumer/selly.go index 9d9d7d3..1402a4b 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -7,10 +7,12 @@ var Selly = struct { CheckAnDInsertCashflowBySeller string SubscriberTopic string UpdateSellerSavingCampaignStatistic string + GenerateVoucherPromotion string }{ 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", + GenerateVoucherPromotion: "PULL_GENERATE_VOUCHER_PROMOTION", } diff --git a/js/model/selly.go b/js/model/selly.go index fb7d867..dc2f266 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -1,5 +1,7 @@ package jsmodel +import "go.mongodb.org/mongo-driver/bson/primitive" + // PushNotification ... type PushNotification struct { User string `json:"user"` @@ -92,3 +94,16 @@ type SellerSavingCampaignStatistic struct { SavingCampaignCashPending float64 `json:"savingCampaignCashPending"` SavingCampaignCashCompleted float64 `json:"savingCampaignCashCompleted"` } + +// GenerateVoucherPromotion ... +type GenerateVoucherPromotion struct { + Cash float64 `json:"cash"` + TargetID primitive.ObjectID `json:"targetId"` + TargetType string `json:"targetType"` + Options GenerateVoucherPromotionOptions `json:"options"` +} + +// GenerateVoucherPromotionOptions ... +type GenerateVoucherPromotionOptions struct { + Title string `json:"title"` +} diff --git a/js/subject/selly.go b/js/subject/selly.go index 9065251..fbb6eed 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -16,10 +16,12 @@ var Selly = struct { CheckAnDInsertCashflowBySeller string SubscriberTopic string UpdateSellerSavingCampaignStatistic string + GenerateVoucherPromotion string }{ 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"), + GenerateVoucherPromotion: getSellyValue("generate_voucher_promotion"), }