diff --git a/model/user.go b/model/user.go index 06cf685c..b941c164 100644 --- a/model/user.go +++ b/model/user.go @@ -13,8 +13,8 @@ import ( // Otherwise, the sensitive information will be saved on local storage in plain text! type User struct { Id int `json:"id"` - Username string `json:"username" gorm:"unique;index" validate:"max=12"` - Password string `json:"password" gorm:"not null;" validate:"min=8,max=20"` + Username string `json:"username" gorm:"unique;index" validate:"max=30"` + Password string `json:"password" gorm:"not null;" validate:"min=8,max=30"` DisplayName string `json:"display_name" gorm:"index" validate:"max=20"` Role int `json:"role" gorm:"type:int;default:1"` // admin, common Status int `json:"status" gorm:"type:int;default:1"` // enabled, disabled