package model import ( "github.com/jackc/pgtype" "gorm.io/gorm" ) type User struct { gorm.Model `json:"meta"` 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"` }