31 lines
589 B
Go
Raw Normal View History

2023-06-19 12:15:30 +02:00
package milestone
import (
2023-06-28 17:43:19 +02:00
"context"
"github.com/zitadel/zitadel/internal/api/authz"
2023-06-19 12:15:30 +02:00
"github.com/zitadel/zitadel/internal/eventstore"
)
const (
AggregateType = "milestone"
AggregateVersion = "v1"
)
type Aggregate struct {
eventstore.Aggregate
}
2023-06-28 17:43:19 +02:00
func NewAggregate(ctx context.Context, id string) *Aggregate {
instanceID := authz.GetInstance(ctx).InstanceID()
2023-06-19 12:15:30 +02:00
return &Aggregate{
Aggregate: eventstore.Aggregate{
Type: AggregateType,
Version: AggregateVersion,
ID: id,
2023-06-28 17:43:19 +02:00
ResourceOwner: instanceID,
2023-06-28 08:19:34 +02:00
InstanceID: instanceID,
2023-06-19 12:15:30 +02:00
},
}
}