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