111 lines
4.1 KiB
Go
111 lines
4.1 KiB
Go
package jsmodel
|
|
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
// PushNotification ...
|
|
type PushNotification struct {
|
|
User string `json:"user"`
|
|
Type string `json:"type"`
|
|
TargetID string `json:"targetId"`
|
|
IsFromAdmin bool `json:"isFromAdmin"`
|
|
Category string `json:"category"`
|
|
Options NotificationOptions `json:"options"`
|
|
}
|
|
|
|
// NotificationOptions ...
|
|
type NotificationOptions struct {
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
CampaignID string `json:"campaignId,omitempty"`
|
|
SellerSavingCampaignID string `json:"sellerSavingCampaignId,omitempty"`
|
|
SellerSavingCampaignStatus string `json:"sellerSavingCampaignStatus,omitempty"`
|
|
}
|
|
|
|
// 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"`
|
|
CommissionTransactionPending float64 `json:"commissionTransactionPending"`
|
|
CommissionTransactionRejected float64 `json:"commissionTransactionRejected"`
|
|
}
|
|
|
|
// PayloadCashflowsBySeller ...
|
|
type PayloadCashflowsBySeller struct {
|
|
SellerID string `json:"sellerId"`
|
|
List []CashflowSeller `json:"list"`
|
|
}
|
|
|
|
// CashflowSeller ...
|
|
type CashflowSeller struct {
|
|
Value float64 `json:"value"`
|
|
Action string `json:"action"`
|
|
Category string `json:"category"`
|
|
TargetID string `json:"targetId"`
|
|
TargetType string `json:"targetType"`
|
|
Options *CashFlowOptions `json:"options"`
|
|
}
|
|
|
|
// CashFlowOptions ...
|
|
type CashFlowOptions struct {
|
|
AffiliateTransactionCode string `json:"affiliateTransactionCode,omitempty"`
|
|
AffiliateCampaignID string `json:"affiliateCampaignId,omitempty"`
|
|
AffiliateCampaignName string `json:"affiliateCampaignName,omitempty"`
|
|
|
|
// Campaign
|
|
CampaignID string `json:"campaignId,omitempty"`
|
|
CampaignName string `json:"campaignName,omitempty"`
|
|
|
|
// SavingCampaign
|
|
SavingCampaignID string `json:"savingCampaignId,omitempty"`
|
|
SavingCampaignName string `json:"savingCampaignName,omitempty"`
|
|
|
|
SavingCampaignItemID string `json:"savingCampaignItemId,omitempty"`
|
|
SavingCampaignItemName string `json:"savingCampaignItemName,omitempty"`
|
|
}
|
|
|
|
// SubscriberNotificationTopic ...
|
|
type SubscriberNotificationTopic struct {
|
|
User string `json:"user"`
|
|
Topic string `json:"topic"`
|
|
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"`
|
|
}
|
|
|
|
// GenerateVoucherPromotion ...
|
|
type GenerateVoucherPromotion struct {
|
|
Cash float64 `json:"cash"`
|
|
TargetID primitive.ObjectID `json:"targetId"`
|
|
TargetType string `json:"targetType"`
|
|
Options GenerateVoucherPromotionOptions `json:"options"`
|
|
Seller primitive.ObjectID `json:"seller"`
|
|
}
|
|
|
|
// GenerateVoucherPromotionOptions ...
|
|
type GenerateVoucherPromotionOptions struct {
|
|
Title string `json:"title"`
|
|
}
|