Files
sm-user-plugin/models/user.go

19 lines
549 B
Go

package models
// User is the minimal users row the JWT guard loads.
type User struct {
ID uint `gorm:"column:id;primaryKey"`
Email string `gorm:"column:email"`
Password string `gorm:"column:password" json:"-"`
MustChangePassword bool `gorm:"column:must_change_password"`
}
func (User) TableName() string { return "users" }
// Hidden mirrors PHP User::$hidden for the columns this stub carries (D-08).
func (User) Hidden() []string { return []string{"password"} }
func init() {
Register(User{})
}