diff options
Diffstat (limited to 'internal/gtsmodel')
-rw-r--r-- | internal/gtsmodel/token.go | 2 | ||||
-rw-r--r-- | internal/gtsmodel/user.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/gtsmodel/token.go b/internal/gtsmodel/token.go index 5fa96e915..8058d9edf 100644 --- a/internal/gtsmodel/token.go +++ b/internal/gtsmodel/token.go @@ -26,7 +26,7 @@ type Token struct { CreatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item created UpdatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item last updated ClientID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // ID of the client who owns this token - UserID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // ID of the user who owns this token + UserID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero"` // ID of the user who owns this token RedirectURI string `validate:"required,uri" bun:",nullzero,notnull"` // Oauth redirect URI for this token Scope string `validate:"required" bun:",nullzero,notnull"` // Oauth scope Code string `validate:"-" bun:",pk,nullzero,notnull,default:''"` // Code, if present diff --git a/internal/gtsmodel/user.go b/internal/gtsmodel/user.go index 28156cfdd..b49a8b28b 100644 --- a/internal/gtsmodel/user.go +++ b/internal/gtsmodel/user.go @@ -38,7 +38,7 @@ type User struct { CurrentSignInIP net.IP `validate:"-" bun:",nullzero"` // What's the most recent IP of this user LastSignInAt time.Time `validate:"-" bun:"type:timestamp,nullzero"` // When did this user last sign in? LastSignInIP net.IP `validate:"-" bun:",nullzero"` // What's the previous IP of this user? - SignInCount int `validate:"min=0" bun:",nullzero,notnull,default:0"` // How many times has this user signed in? + SignInCount int `validate:"min=0" bun:",notnull,default:0"` // How many times has this user signed in? InviteID string `validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"` // id of the user who invited this user (who let this joker in?) ChosenLanguages []string `validate:"-" bun:",nullzero"` // What languages does this user want to see? FilteredLanguages []string `validate:"-" bun:",nullzero"` // What languages does this user not want to see? |