goes/data/event.go

19 lines
355 B
Go

package data
import (
"github.com/satori/go.uuid"
"reflect"
"time"
)
type Event struct {
AggregateId uuid.UUID
CreationTime time.Time
Payload interface{}
Metadata interface{}
}
func (me *Event) Equals(other *Event) bool {
return me.AggregateId == other.AggregateId && reflect.DeepEqual(me.Payload, other.Payload)
}