Refactoring: re-organize project intro multiple packages (folders)
This commit is contained in:
15
data/event.go
Normal file
15
data/event.go
Normal file
@ -0,0 +1,15 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"github.com/satori/go.uuid"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
AggregateId uuid.UUID
|
||||
Payload interface{}
|
||||
}
|
||||
|
||||
func (me *Event) Equals(other *Event) bool {
|
||||
return me.AggregateId == other.AggregateId && reflect.DeepEqual(me.Payload, other.Payload)
|
||||
}
|
Reference in New Issue
Block a user