mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
dc56e298ae
* fix: use domain models for v2 eventstore * fix: user domain model * Update internal/api/grpc/admin/login_policy_converter.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: converter Co-authored-by: Livio Amstutz <livio.a@gmail.com>
26 lines
399 B
Go
26 lines
399 B
Go
package domain
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/crypto"
|
|
es_models "github.com/caos/zitadel/internal/eventstore/models"
|
|
"time"
|
|
)
|
|
|
|
type Email struct {
|
|
es_models.ObjectRoot
|
|
|
|
EmailAddress string
|
|
IsEmailVerified bool
|
|
}
|
|
|
|
type EmailCode struct {
|
|
es_models.ObjectRoot
|
|
|
|
Code *crypto.CryptoValue
|
|
Expiry time.Duration
|
|
}
|
|
|
|
func (e *Email) IsValid() bool {
|
|
return e.EmailAddress != ""
|
|
}
|