mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-24 16:41:33 +00:00
20 lines
507 B
Go
20 lines
507 B
Go
![]() |
package object
|
||
|
|
||
|
import (
|
||
|
"google.golang.org/protobuf/types/known/timestamppb"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/domain"
|
||
|
object "github.com/zitadel/zitadel/pkg/grpc/object/v2alpha"
|
||
|
)
|
||
|
|
||
|
func DomainToDetailsPb(objectDetail *domain.ObjectDetails) *object.Details {
|
||
|
details := &object.Details{
|
||
|
Sequence: objectDetail.Sequence,
|
||
|
ResourceOwner: objectDetail.ResourceOwner,
|
||
|
}
|
||
|
if !objectDetail.EventDate.IsZero() {
|
||
|
details.ChangeDate = timestamppb.New(objectDetail.EventDate)
|
||
|
}
|
||
|
return details
|
||
|
}
|