Merge pull request #35 from Selly-Modules/feature/seller-by-id

Feature/seller by
This commit is contained in:
Minh Nguyen 2022-09-23 22:12:04 +07:00 committed by GitHub
commit c2acdaf244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 4 deletions

View File

@ -3,6 +3,8 @@ package jsconsumer
// Selly ... // Selly ...
var Selly = struct { var Selly = struct {
PushNotification string PushNotification string
UpdateSellerAffiliateStatistic string
}{ }{
PushNotification: "PULL_PUSH_NOTIFICATION", PushNotification: "PULL_PUSH_NOTIFICATION",
UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC",
} }

View File

@ -15,3 +15,22 @@ type NotificationOptions struct {
Title string `json:"title"` Title string `json:"title"`
Content string `json:"content"` Content string `json:"content"`
} }
// PayloadUpdateSellerAffiliateStatistic ...
type PayloadUpdateSellerAffiliateStatistic struct {
SellerID string `json:"sellerId"`
Statistic SellerAffiliateStatistic `json:"statistic"`
}
// SellerAffiliateStatistic ...
type SellerAffiliateStatistic struct {
TransactionTotal int `json:"transactionTotal"`
TransactionCashback int `json:"transactionCashback"`
TransactionPending int `json:"transactionPending"`
TransactionApproved int `json:"transactionApproved"`
TransactionRejected int `json:"transactionRejected"`
CommissionTransactionTotal float64 `json:"commissionTransactionTotal"`
CommissionTransactionCashback float64 `json:"commissionTransactionCashback"`
CommissionTransactionApproved float64 `json:"commissionTransactionApproved"`
CommissionTransactionRejected float64 `json:"commissionTransactionRejected"`
}

View File

@ -12,6 +12,8 @@ func getSellyValue(val string) string {
// Selly ... // Selly ...
var Selly = struct { var Selly = struct {
PushNotification string PushNotification string
UpdateSellerAffiliateStatistic string
}{ }{
PushNotification: getSellyValue("push_notifications"), PushNotification: getSellyValue("push_notifications"),
UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"),
} }