- Move models, classes, controllers, middleware, and updates into subpackages - Add self-registering models/updates/classes registries so later plans add files - Keep the genres route and shipped migration SQL unchanged
16 lines
399 B
Go
16 lines
399 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"`
|
|
MustChangePassword bool `gorm:"column:must_change_password"`
|
|
}
|
|
|
|
func (User) TableName() string { return "users" }
|
|
|
|
func init() {
|
|
Register(User{})
|
|
}
|