diff options
author | 2021-08-30 13:38:06 +0200 | |
---|---|---|
committer | 2021-09-01 11:11:26 +0200 | |
commit | dc2e1bf9aba9b52b6de979aadb1a0efcbd07f088 (patch) | |
tree | d4104270d6ce275d0cded0459bf3168cab3526ab /internal/gtsmodel/user.go | |
parent | statusmute annotations (diff) | |
download | gotosocial-dc2e1bf9aba9b52b6de979aadb1a0efcbd07f088.tar.xz |
more work on struct validation
Diffstat (limited to 'internal/gtsmodel/user.go')
-rw-r--r-- | internal/gtsmodel/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gtsmodel/user.go b/internal/gtsmodel/user.go index 27089763d..4e7c4638a 100644 --- a/internal/gtsmodel/user.go +++ b/internal/gtsmodel/user.go @@ -29,7 +29,7 @@ type User struct { ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database CreatedAt time.Time `validate:"required" bun:",nullzero,notnull,default:current_timestamp"` // when was item created UpdatedAt time.Time `validate:"required" bun:",nullzero,notnull,default:current_timestamp"` // when was item last updated - Email string `validate:"required_with=ConfirmedAt" bun:",nullzero,notnull,unique"` // confirmed email address for this user, this should be unique -- only one email address registered per instance, multiple users per email are not supported + Email string `validate:"required_with=ConfirmedAt" bun:",nullzero,unique"` // confirmed email address for this user, this should be unique -- only one email address registered per instance, multiple users per email are not supported AccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull,unique"` // The id of the local gtsmodel.Account entry for this user. Account *Account `validate:"-" bun:"rel:belongs-to"` // Pointer to the account of this user that corresponds to AccountID. EncryptedPassword string `validate:"required" bun:",nullzero,notnull"` // The encrypted password of this user, generated using https://pkg.go.dev/golang.org/x/crypto/bcrypt#GenerateFromPassword. A salt is included so we're safe against 🌈 tables. |