mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:47:32 +00:00
fix(eventstore): use decimal, correct mirror (#9905)
back port #9812, #9878, #9881, #9884 --------- Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
This commit is contained in:
@@ -1,19 +1,23 @@
|
||||
package eventstore
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
// ReadModel is the minimum representation of a read model.
|
||||
// It implements a basic reducer
|
||||
// it might be saved in a database or in memory
|
||||
type ReadModel struct {
|
||||
AggregateID string `json:"-"`
|
||||
ProcessedSequence uint64 `json:"-"`
|
||||
CreationDate time.Time `json:"-"`
|
||||
ChangeDate time.Time `json:"-"`
|
||||
Events []Event `json:"-"`
|
||||
ResourceOwner string `json:"-"`
|
||||
InstanceID string `json:"-"`
|
||||
Position float64 `json:"-"`
|
||||
AggregateID string `json:"-"`
|
||||
ProcessedSequence uint64 `json:"-"`
|
||||
CreationDate time.Time `json:"-"`
|
||||
ChangeDate time.Time `json:"-"`
|
||||
Events []Event `json:"-"`
|
||||
ResourceOwner string `json:"-"`
|
||||
InstanceID string `json:"-"`
|
||||
Position decimal.Decimal `json:"-"`
|
||||
}
|
||||
|
||||
// AppendEvents adds all the events to the read model.
|
||||
|
Reference in New Issue
Block a user