woj-server/internal/model/User.go

15 lines
370 B
Go
Raw Permalink Normal View History

2022-09-17 09:23:36 +08:00
package model
2022-09-08 22:00:25 +08:00
import (
"gorm.io/gorm"
)
type User struct {
gorm.Model `json:"meta"`
2024-01-05 14:31:09 +08:00
Email string `json:"email" gorm:"not null;uniqueIndex"`
NickName string `json:"nick_name" gorm:"not null;uniqueIndex"`
2022-09-20 14:34:30 +08:00
Role Role `json:"role" gorm:"not null"`
2024-01-03 00:55:41 +08:00
Password []byte `json:"-"`
2022-09-08 22:00:25 +08:00
IsEnabled bool `json:"is_enabled" gorm:"not null;index"`
}