zitadel/internal/user/model/profile.go
Florian Forster fa9f581d56
chore(v2): move to new org (#3499)
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2022-04-26 23:01:45 +00:00

30 lines
605 B
Go

package model
import (
"golang.org/x/text/language"
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
)
type Profile struct {
es_models.ObjectRoot
FirstName string
LastName string
NickName string
DisplayName string
PreferredLanguage language.Tag
Gender Gender
PreferredLoginName string
LoginNames []string
AvatarURL string
}
func (p *Profile) IsValid() bool {
return p.FirstName != "" && p.LastName != ""
}
func (p *Profile) SetNamesAsDisplayname() {
p.DisplayName = p.FirstName + " " + p.LastName
}