You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
460 B

2 years ago
package tables
type User struct {
Model
Username string `gorm:"uniqueIndex;" json:"username"`
Password string `gorm:"" json:"-"`
PasswordSalt string `gorm:"" json:"-"`
JWTToken string `gorm:"" json:"jwtToken"`
Name string `gorm:"uniqueIndex;" json:"name"`
Email string `gorm:"uniqueIndex;" json:"email"`
Telephone string `gorm:"uniqueIndex;" json:"telephone"`
Roles []Role `gorm:"many2many:role_user;" json:"roles"`
}