received_message.go
504 字节
package domain
import (
"encoding/json"
"time"
)
type ReceivedMessage struct {
MessageId int64
MessageType string
MessageBody string
OccurredOn time.Time
CreateAt time.Time
}
type MessageBody struct {
Module string `json:"module"`
Action string `json:"action"`
Datas json.RawMessage `json:"data"` // 具体的对象JSON数据
}
type ReceivedMessageRepository interface {
SaveMessage(param *ReceivedMessage) error
FindMessage(id int64) (*ReceivedMessage, error)
}