natsio/model/seller_request.go

75 lines
2.7 KiB
Go
Raw Permalink Normal View History

2022-09-15 07:09:54 +00:00
package model
import "go.mongodb.org/mongo-driver/bson/primitive"
type GetSellerByIDRequest struct {
SellerID primitive.ObjectID `json:"sellerId"`
}
2022-09-19 04:48:30 +00:00
type GetListSellerByIDsRequest struct {
SellerIDs []primitive.ObjectID `json:"sellerIds"`
}
2022-09-21 03:19:17 +00:00
type GetListSellerSupportChatByIDsRequest struct {
SellerIDs []primitive.ObjectID `json:"sellerIds"`
}
type CheckAndInsertCashflowsRequest struct {
SellerID string `json:"sellerId"`
List []CashflowSeller `json:"list"`
}
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"`
}
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"`
}
type UpdateSellerAffiliateStatisticRequest struct {
SellerID string `json:"sellerId"`
Statistic SellerAffiliateStatistic `json:"statistic"`
}
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"`
}
type UpdateSellerSavingCampaignStatisticRequest struct {
SellerID string `json:"sellerId"`
Statistic SellerSavingCampaignStatistic `json:"statistic"`
}
type SellerSavingCampaignStatistic struct {
SavingCampaignCashPending float64 `json:"savingCampaignCashPending"`
SavingCampaignCashCompleted float64 `json:"savingCampaignCashCompleted"`
}