Update mengyastore
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
package mq
|
||||
|
||||
import "mengyastore-backend/internal/email"
|
||||
|
||||
// OrderEmailPayload is the JSON body published to RabbitMQ (no SMTP secrets).
|
||||
type OrderEmailPayload struct {
|
||||
ToEmail string `json:"toEmail"`
|
||||
ToName string `json:"toName"`
|
||||
ProductName string `json:"productName"`
|
||||
OrderID string `json:"orderId"`
|
||||
Quantity int `json:"quantity"`
|
||||
Codes []string `json:"codes"`
|
||||
IsManual bool `json:"isManual"`
|
||||
}
|
||||
|
||||
func (p OrderEmailPayload) ToNotifyData() email.OrderNotifyData {
|
||||
return email.OrderNotifyData{
|
||||
ToEmail: p.ToEmail,
|
||||
ToName: p.ToName,
|
||||
ProductName: p.ProductName,
|
||||
OrderID: p.OrderID,
|
||||
Quantity: p.Quantity,
|
||||
Codes: p.Codes,
|
||||
IsManual: p.IsManual,
|
||||
}
|
||||
}
|
||||
package mq
|
||||
|
||||
import "mengyastore-backend/internal/email"
|
||||
|
||||
// OrderEmailPayload is the JSON body published to RabbitMQ (no SMTP secrets).
|
||||
type OrderEmailPayload struct {
|
||||
ToEmail string `json:"toEmail"`
|
||||
ToName string `json:"toName"`
|
||||
ProductName string `json:"productName"`
|
||||
OrderID string `json:"orderId"`
|
||||
Quantity int `json:"quantity"`
|
||||
Codes []string `json:"codes"`
|
||||
IsManual bool `json:"isManual"`
|
||||
}
|
||||
|
||||
func (p OrderEmailPayload) ToNotifyData() email.OrderNotifyData {
|
||||
return email.OrderNotifyData{
|
||||
ToEmail: p.ToEmail,
|
||||
ToName: p.ToName,
|
||||
ProductName: p.ProductName,
|
||||
OrderID: p.OrderID,
|
||||
Quantity: p.Quantity,
|
||||
Codes: p.Codes,
|
||||
IsManual: p.IsManual,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user