⬆️ dashboard v0.12.26 update gorm fields tags

This commit is contained in:
naiba
2022-04-26 12:46:44 +08:00
parent 0e35862b23
commit b5f33a6c5b
6 changed files with 27 additions and 14 deletions

View File

@@ -11,15 +11,15 @@ import (
type User struct {
Common
Login string `gorm:"UNIQUE_INDEX" json:"login,omitempty"` // 登录名
AvatarURL string `json:"avatar_url,omitempty"` // 头像地址
Name string `json:"name,omitempty"` // 昵称
Blog string `json:"blog,omitempty"` // 网站链接
Email string `json:"email,omitempty"` // 邮箱
Login string `gorm:"uniqueIndex" json:"login,omitempty"` // 登录名
AvatarURL string `json:"avatar_url,omitempty"` // 头像地址
Name string `json:"name,omitempty"` // 昵称
Blog string `json:"blog,omitempty"` // 网站链接
Email string `json:"email,omitempty"` // 邮箱
Hireable bool `json:"hireable,omitempty"`
Bio string `json:"bio,omitempty"` // 个人简介
Token string `gorm:"UNIQUE_INDEX" json:"-"` // 认证 Token
Token string `gorm:"uniqueIndex" json:"-"` // 认证 Token
TokenExpired time.Time `json:"token_expired,omitempty"` // Token 过期时间
SuperAdmin bool `json:"super_admin,omitempty"` // 超级管理员
}