fix: Previous sequence (#1086)

* feat: remove previous sequence check

* feat: object creation date

* feat: simplify member write model

* feat: simplify write model

* feat: simplify write model
This commit is contained in:
Fabi
2020-12-14 17:24:01 +01:00
committed by GitHub
parent 5b433dcaa3
commit 7f26f1815b
60 changed files with 229 additions and 693 deletions
@@ -25,10 +25,6 @@ type ChangedEvent struct {
EmailAddress string `json:"email,omitempty"`
}
func (e *ChangedEvent) CheckPrevious() bool {
return true
}
func (e *ChangedEvent) Data() interface{} {
return e
}
@@ -68,10 +64,6 @@ type VerifiedEvent struct {
IsEmailVerified bool `json:"-"`
}
func (e *VerifiedEvent) CheckPrevious() bool {
return true
}
func (e *VerifiedEvent) Data() interface{} {
return nil
}
@@ -97,10 +89,6 @@ type VerificationFailedEvent struct {
eventstore.BaseEvent `json:"-"`
}
func (e *VerificationFailedEvent) CheckPrevious() bool {
return false
}
func (e *VerificationFailedEvent) Data() interface{} {
return nil
}
@@ -127,10 +115,6 @@ type CodeAddedEvent struct {
Expiry time.Duration `json:"expiry,omitempty"`
}
func (e *CodeAddedEvent) CheckPrevious() bool {
return true
}
func (e *CodeAddedEvent) Data() interface{} {
return e
}
@@ -165,10 +149,6 @@ type CodeSentEvent struct {
eventstore.BaseEvent `json:"-"`
}
func (e *CodeSentEvent) CheckPrevious() bool {
return true
}
func (e *CodeSentEvent) Data() interface{} {
return nil
}