mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
d8e42744b4
* fix: move eventstore pkgs * fix: move eventstore pkgs * fix: remove v2 view * fix: remove v2 view
32 lines
1.0 KiB
Go
32 lines
1.0 KiB
Go
package management
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/domain"
|
|
iam_model "github.com/caos/zitadel/internal/iam/model"
|
|
"github.com/caos/zitadel/pkg/grpc/management"
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
func mailTemplateRequestToDomain(mailTemplate *management.MailTemplateUpdate) *domain.MailTemplate {
|
|
return &domain.MailTemplate{
|
|
Template: mailTemplate.Template,
|
|
}
|
|
}
|
|
|
|
func mailTemplateFromDomain(mailTemplate *domain.MailTemplate) *management.MailTemplate {
|
|
return &management.MailTemplate{
|
|
Template: mailTemplate.Template,
|
|
CreationDate: timestamppb.New(mailTemplate.CreationDate),
|
|
ChangeDate: timestamppb.New(mailTemplate.ChangeDate),
|
|
}
|
|
}
|
|
|
|
func mailTemplateViewFromModel(mailTemplate *iam_model.MailTemplateView) *management.MailTemplateView {
|
|
return &management.MailTemplateView{
|
|
Default: mailTemplate.Default,
|
|
Template: mailTemplate.Template,
|
|
CreationDate: timestamppb.New(mailTemplate.CreationDate),
|
|
ChangeDate: timestamppb.New(mailTemplate.ChangeDate),
|
|
}
|
|
}
|