- 增加登录日志

- 增加数据库索引
- 修改原生安装文档
This commit is contained in:
dushixiang
2021-01-20 22:57:26 +08:00
parent 1d4653a561
commit f0157dbaeb
20 changed files with 700 additions and 78 deletions

View File

@ -13,7 +13,7 @@ const (
type User struct {
ID string `gorm:"primary_key" json:"id"`
Username string `json:"username"`
Username string `gorm:"index:unique" json:"username"`
Password string `json:"password"`
Nickname string `json:"nickname"`
TOTPSecret string `json:"-"`
@ -24,7 +24,7 @@ type User struct {
}
type UserVo struct {
ID string `gorm:"primary_key" json:"id"`
ID string `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Online bool `json:"online"`