🎨 新增用户登录日志记录
This commit is contained in:
22
model/user/login_log.go
Normal file
22
model/user/login_log.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package user
|
||||
|
||||
import "git.echol.cn/loser/lckt/global"
|
||||
|
||||
type LoginLog struct {
|
||||
global.GVA_MODEL
|
||||
UserId uint `json:"user_id" gorm:"comment:用户ID;index"`
|
||||
UserName string `json:"user_name" gorm:"comment:用户登录名"`
|
||||
Phone string `json:"phone" gorm:"comment:用户手机号"`
|
||||
Ip string `json:"ip" gorm:"comment:登录IP"`
|
||||
Address string `json:"address" gorm:"comment:登录地址"`
|
||||
UserAgent string `json:"user_agent" gorm:"comment:用户代理"`
|
||||
// 登录设备
|
||||
Device string `json:"device" gorm:"comment:登录设备"`
|
||||
// 登录方式
|
||||
Mode string `json:"mode" gorm:"comment:登录方式"`
|
||||
LoginTime string `json:"login_time" gorm:"comment:登录时间"`
|
||||
}
|
||||
|
||||
func (LoginLog) TableName() string {
|
||||
return "user_login_log"
|
||||
}
|
@@ -43,6 +43,7 @@ type BindPhoneReq struct {
|
||||
|
||||
type GetUserListReq struct {
|
||||
request.PageInfo
|
||||
UserId uint `json:"user_id" form:"user_id"`
|
||||
Type int `json:"type" form:"type"`
|
||||
UserLabel string `json:"user_label" form:"user_label" `
|
||||
Status int `json:"status" form:"status"`
|
||||
|
Reference in New Issue
Block a user