natsio/js/model/selly.go

111 lines
4.1 KiB
Go
Raw Permalink Normal View History

2022-09-23 04:17:03 +00:00
package jsmodel
2022-09-23 03:13:14 +00:00
2023-03-14 04:34:38 +00:00
import "go.mongodb.org/mongo-driver/bson/primitive"
2022-09-23 04:17:03 +00:00
// PushNotification ...
type PushNotification struct {
2022-09-23 07:47:00 +00:00
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 {
2023-03-02 07:15:15 +00:00
Title string `json:"title"`
Content string `json:"content"`
CampaignID string `json:"campaignId,omitempty"`
SellerSavingCampaignID string `json:"sellerSavingCampaignId,omitempty"`
SellerSavingCampaignStatus string `json:"sellerSavingCampaignStatus,omitempty"`
2022-09-23 03:13:14 +00:00
}
2022-09-23 15:11:24 +00:00
// 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"`
2022-09-30 03:29:14 +00:00
CommissionTransactionPending float64 `json:"commissionTransactionPending"`
2022-09-23 15:11:24 +00:00
CommissionTransactionRejected float64 `json:"commissionTransactionRejected"`
}
2022-09-23 16:32:23 +00:00
// 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"`
2022-11-24 07:15:53 +00:00
// Campaign
CampaignID string `json:"campaignId,omitempty"`
CampaignName string `json:"campaignName,omitempty"`
2023-02-28 10:14:49 +00:00
// SavingCampaign
SavingCampaignID string `json:"savingCampaignId,omitempty"`
SavingCampaignName string `json:"savingCampaignName,omitempty"`
SavingCampaignItemID string `json:"savingCampaignItemId,omitempty"`
SavingCampaignItemName string `json:"savingCampaignItemName,omitempty"`
2022-09-23 16:32:23 +00:00
}
2023-03-02 04:44:13 +00:00
// PayloadUpdateSellerSavingCampaignStatistic ...
type PayloadUpdateSellerSavingCampaignStatistic struct {
SellerID string `json:"sellerId"`
Statistic SellerSavingCampaignStatistic `json:"statistic"`
}
// SellerSavingCampaignStatistic ...
type SellerSavingCampaignStatistic struct {
SavingCampaignCashPending float64 `json:"savingCampaignCashPending"`
SavingCampaignCashCompleted float64 `json:"savingCampaignCashCompleted"`
}
2023-03-14 04:34:38 +00:00
// GenerateVoucherPromotion ...
type GenerateVoucherPromotion struct {
Cash float64 `json:"cash"`
TargetID primitive.ObjectID `json:"targetId"`
TargetType string `json:"targetType"`
Options GenerateVoucherPromotionOptions `json:"options"`
2023-03-14 04:47:16 +00:00
Seller primitive.ObjectID `json:"seller"`
2023-03-14 04:34:38 +00:00
}
// GenerateVoucherPromotionOptions ...
type GenerateVoucherPromotionOptions struct {
Title string `json:"title"`
}
2023-02-28 08:14:49 +00:00
// SubscriberNotificationTopic ...
type SubscriberNotificationTopic struct {
User string `json:"user"`
Topic string `json:"topic"`
DeviceId string `json:"deviceId"`
FCMToken string `json:"fcmToken"`
}