修复 「1.2.2 用户管理-用户列表勾选单一用户会全选 」 close #216

This commit is contained in:
dushixiang
2022-01-23 17:53:22 +08:00
parent 29c066ca3a
commit d35b348a33
130 changed files with 5467 additions and 4554 deletions

View File

@ -8,7 +8,6 @@ type AccessGateway struct {
Name string `gorm:"type:varchar(500)" json:"name"`
IP string `gorm:"type:varchar(500)" json:"ip"`
Port int `gorm:"type:int(5)" json:"port"`
Localhost string `gorm:"type:varchar(200)" json:"localhost"` // 隧道映射到本地的地址
AccountType string `gorm:"type:varchar(50)" json:"accountType"`
Username string `gorm:"type:varchar(200)" json:"username"`
Password string `gorm:"type:varchar(500)" json:"password"`

View File

@ -0,0 +1,14 @@
package model
import "next-terminal/server/utils"
type AccessToken struct {
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
UserId string `gorm:"index,type:varchar(200)" json:"userId"`
Token string `gorm:"index,type:varchar(128)" json:"token"`
Created utils.JsonTime `json:"created"`
}
func (r *AccessToken) TableName() string {
return "access_token"
}

View File

@ -5,7 +5,7 @@ import (
)
type LoginLog struct {
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
ID string `gorm:"primary_key,type:varchar(128)" json:"id"`
Username string `gorm:"index,type:varchar(200)" json:"username"`
ClientIP string `gorm:"type:varchar(200)" json:"clientIp"`
ClientUserAgent string `gorm:"type:varchar(500)" json:"clientUserAgent"`

View File

@ -26,12 +26,15 @@ type Session struct {
ConnectedTime utils.JsonTime `json:"connectedTime"`
DisconnectedTime utils.JsonTime `json:"disconnectedTime"`
Mode string `gorm:"type:varchar(10)" json:"mode"`
Upload string `gorm:"type:varchar(1)" json:"upload"` // 1 = true, 0 = false
FileSystem string `gorm:"type:varchar(1)" json:"fileSystem"` // 1 = true, 0 = false
Upload string `gorm:"type:varchar(1)" json:"upload"`
Download string `gorm:"type:varchar(1)" json:"download"`
Delete string `gorm:"type:varchar(1)" json:"delete"`
Rename string `gorm:"type:varchar(1)" json:"rename"`
Edit string `gorm:"type:varchar(1)" json:"edit"`
CreateDir string `gorm:"type:varchar(1)" json:"createDir"`
Copy string `gorm:"type:varchar(1)" json:"copy"`
Paste string `gorm:"type:varchar(1)" json:"paste"`
StorageId string `gorm:"type:varchar(36)" json:"storageId"`
AccessGatewayId string `gorm:"type:varchar(36)" json:"accessGatewayId"`
Reviewed bool `gorm:"type:tinyint(1)" json:"reviewed"`

View File

@ -11,6 +11,8 @@ type Strategy struct {
Rename string `gorm:"type:varchar(1)" json:"rename"`
Edit string `gorm:"type:varchar(1)" json:"edit"`
CreateDir string `gorm:"type:varchar(1)" json:"createDir"`
Copy string `gorm:"type:varchar(1)" json:"copy"`
Paste string `gorm:"type:varchar(1)" json:"paste"`
Created utils.JsonTime `json:"created"`
}

View File

@ -15,6 +15,7 @@ type User struct {
Created utils.JsonTime `json:"created"`
Type string `gorm:"type:varchar(20)" json:"type"`
Mail string `gorm:"type:varchar(500)" json:"mail"`
Source string `gorm:"type:varchar(20)" json:"source"`
}
type UserForPage struct {
@ -27,6 +28,7 @@ type UserForPage struct {
Status string `json:"status"`
Created utils.JsonTime `json:"created"`
Type string `json:"type"`
Source string `json:"source"`
SharerAssetCount int64 `json:"sharerAssetCount"`
}