woj-server/internal/repo/postgresql/User.go

14 lines
330 B
Go
Raw Normal View History

2022-09-08 22:00:25 +08:00
package postgresql
import (
"gorm.io/gorm"
)
type User struct {
gorm.Model `json:"-"`
UserName string `json:"user_name" gorm:"not null;uniqueIndex"`
NickName string `json:"nick_name" gorm:"not null"`
Password []byte `json:"-" gorm:"not null"`
IsEnabled bool `json:"is_enabled" gorm:"not null;index"`
}