Fix User model json fields

This commit is contained in:
Noah Petherbridge 2024-04-24 21:29:44 -07:00
parent 19d06c183f
commit 382c6df96c

View File

@ -19,13 +19,13 @@ import (
type User struct { type User struct {
ID uint64 `gorm:"primaryKey"` ID uint64 `gorm:"primaryKey"`
Username string `gorm:"uniqueIndex"` Username string `gorm:"uniqueIndex"`
Email string `gorm:"uniqueIndex" json:"-"` Email string `gorm:"uniqueIndex"`
HashedPassword string `json:"-"` HashedPassword string `json:"-"`
IsAdmin bool `gorm:"index"` IsAdmin bool `gorm:"index"`
Status UserStatus `gorm:"index"` // active, disabled Status UserStatus `gorm:"index"` // active, disabled
Visibility UserVisibility `gorm:"index"` // public, private Visibility UserVisibility `gorm:"index"` // public, private
Name *string Name *string
Birthdate time.Time `json:"-"` Birthdate time.Time
Certified bool Certified bool
Explicit bool `gorm:"index"` // user has opted-in to see explicit content Explicit bool `gorm:"index"` // user has opted-in to see explicit content
InnerCircle bool `gorm:"index"` // user is in the inner circle InnerCircle bool `gorm:"index"` // user is in the inner circle