mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
b363ddd707
* feat: implement projection for iam and clean up code * feat: add migration * fix: remove unused tests * fix: handler
28 lines
790 B
Go
28 lines
790 B
Go
package query
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/eventstore"
|
|
"github.com/caos/zitadel/internal/eventstore/v1/models"
|
|
"github.com/caos/zitadel/internal/iam/model"
|
|
)
|
|
|
|
func readModelToIAM(readModel *ReadModel) *model.IAM {
|
|
return &model.IAM{
|
|
ObjectRoot: readModelToObjectRoot(readModel.ReadModel),
|
|
GlobalOrgID: readModel.GlobalOrgID,
|
|
IAMProjectID: readModel.ProjectID,
|
|
SetUpDone: readModel.SetUpDone,
|
|
SetUpStarted: readModel.SetUpStarted,
|
|
}
|
|
}
|
|
|
|
func readModelToObjectRoot(readModel eventstore.ReadModel) models.ObjectRoot {
|
|
return models.ObjectRoot{
|
|
AggregateID: readModel.AggregateID,
|
|
ChangeDate: readModel.ChangeDate,
|
|
CreationDate: readModel.CreationDate,
|
|
ResourceOwner: readModel.ResourceOwner,
|
|
Sequence: readModel.ProcessedSequence,
|
|
}
|
|
}
|