improve dev and db performance

This commit is contained in:
Elio Bischof
2023-06-30 12:39:22 +02:00
parent 8fac74e7ee
commit 053212c45e
4 changed files with 77 additions and 38 deletions

View File

@@ -16,18 +16,13 @@ var _ eventstore.Event = (*ScheduledEvent)(nil)
type ScheduledEvent struct {
*eventstore.BaseEvent `json:"-"`
// TODO: `json:"-"`
Timestamp time.Time `json:"timestamp"`
// TODO: `json:"-"`
InstanceIDs []string `json:"instanceIDs"`
// TODO: `json:"-"`
TriggeringEvent eventstore.Event `json:"triggeringEvent"`
Timestamp time.Time `json:"-"`
InstanceIDs []string `json:"-"`
}
func NewScheduledEvent(
ctx context.Context,
timestamp time.Time,
triggeringEvent eventstore.Event,
instanceIDs ...string,
) *ScheduledEvent {
return &ScheduledEvent{
@@ -36,8 +31,7 @@ func NewScheduledEvent(
&NewAggregate().Aggregate,
ScheduledEventType,
),
Timestamp: timestamp,
InstanceIDs: instanceIDs,
TriggeringEvent: triggeringEvent,
Timestamp: timestamp,
InstanceIDs: instanceIDs,
}
}