2022-09-17 09:23:36 +08:00
|
|
|
package model
|
2022-09-08 22:00:25 +08:00
|
|
|
|
|
|
|
import (
|
2024-04-28 22:58:39 +08:00
|
|
|
"github.com/jackc/pgtype"
|
2022-09-08 22:00:25 +08:00
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type User struct {
|
2022-10-22 17:38:39 +08:00
|
|
|
gorm.Model `json:"meta"`
|
2024-04-28 22:58:39 +08:00
|
|
|
UID pgtype.UUID `json:"-" gorm:"not null;uniqueIndex"`
|
|
|
|
NickName string `json:"nick_name" gorm:"not null"`
|
|
|
|
Role Role `json:"role" gorm:"not null"`
|
|
|
|
IsEnabled bool `json:"is_enabled" gorm:"not null;index"`
|
2022-09-08 22:00:25 +08:00
|
|
|
}
|