15 lines
370 B
Go
15 lines
370 B
Go
package model
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type User struct {
|
|
gorm.Model `json:"meta"`
|
|
Email string `json:"email" gorm:"not null;uniqueIndex"`
|
|
NickName string `json:"nick_name" gorm:"not null;uniqueIndex"`
|
|
Role Role `json:"role" gorm:"not null"`
|
|
Password []byte `json:"-"`
|
|
IsEnabled bool `json:"is_enabled" gorm:"not null;index"`
|
|
}
|