mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
16 lines
432 B
Go
16 lines
432 B
Go
|
package eventstore
|
||
|
|
||
|
//ReadModel is the minimum representation of a View model.
|
||
|
// it might be saved in a database or in memory
|
||
|
type ReadModel struct {
|
||
|
ProcessedSequence uint64
|
||
|
ID string
|
||
|
Events []Event
|
||
|
}
|
||
|
|
||
|
//Append adds all the events to the aggregate.
|
||
|
// The function doesn't compute the new state of the read model
|
||
|
func (a *ReadModel) Append(events ...Event) {
|
||
|
a.Events = append(a.Events, events...)
|
||
|
}
|