fix(projections): add base users (#2733)

* fix(projections): add base users

* add user v1 events
This commit is contained in:
Silvan
2021-11-30 08:57:51 +01:00
committed by GitHub
parent d7417b6ef6
commit 30c130f102
6 changed files with 2076 additions and 2 deletions

View File

@@ -50,6 +50,10 @@ func (f Gender) Valid() bool {
return f >= 0 && f < genderCount
}
func (f Gender) Specified() bool {
return f > GenderUnspecified && f < genderCount
}
func (u *Human) IsValid() bool {
return u.Username != "" && u.Profile != nil && u.Profile.IsValid() && u.Email != nil && u.Email.IsValid() && u.Phone == nil || (u.Phone != nil && u.Phone.PhoneNumber != "" && u.Phone.IsValid())
}