payOrderGoodBonus.go 940 字节
package event

import "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"

const (
	//支付订单中货品的分红
	PAY_ORDER_GOOD_BONUS_EVENT       string = "PayOrderGoodBonus"
	BATCH_PAY_ORDER_GOOD_BONUS_EVENT string = "BatchPayOrderGoodBonus"
)

//PayOrderGoodBonus
//事件:支付订单中货品的分红
// type PayOrderGoodBonus struct {
// 	//订单id
// 	OrderId int64
// 	//货品名称
// 	GoodName string
// 	//订单中的货品id
// 	GoodId int64
// 	//管理员id
// 	AdminId int64
// 	//分红额度
// 	PartnerBonus float64
// }

// func (p PayOrderGoodBonus) EventType() string {
// 	return PAY_ORDER_GOOD_BONUS_EVENT
// }

//PayOrderGoodBonus
//事件:批量支付一个订单中货品的分红
type BatchPayOrderGoodBonus struct {
	OrderBase *domain.OrderBase
	Goods     []domain.OrderGood
	Admin     *domain.Users
}

func (p BatchPayOrderGoodBonus) EventType() string {
	return BATCH_PAY_ORDER_GOOD_BONUS_EVENT
}