mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-20 07:51:32 +00:00
36 lines
491 B
Go
36 lines
491 B
Go
![]() |
package org
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/zitadel/internal/eventstore/v2"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
iamEventTypePrefix = eventstore.EventType("org.")
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
AggregateType = "org"
|
||
|
AggregateVersion = "v1"
|
||
|
)
|
||
|
|
||
|
type Aggregate struct {
|
||
|
eventstore.Aggregate
|
||
|
}
|
||
|
|
||
|
func NewAggregate(
|
||
|
id,
|
||
|
resourceOwner string,
|
||
|
previousSequence uint64,
|
||
|
) *Aggregate {
|
||
|
|
||
|
return &Aggregate{
|
||
|
Aggregate: *eventstore.NewAggregate(
|
||
|
id,
|
||
|
AggregateType,
|
||
|
resourceOwner,
|
||
|
AggregateVersion,
|
||
|
previousSequence,
|
||
|
),
|
||
|
}
|
||
|
}
|