feat(admin): Add My Login log

This commit is contained in:
lejianwen
2024-12-27 19:25:59 +08:00
parent 16427164f8
commit 72e3a9a841
7 changed files with 146 additions and 20 deletions

View File

@@ -4,12 +4,13 @@ type LoginLog struct {
IdModel
UserId uint `json:"user_id" gorm:"default:0;not null;"`
Client string `json:"client"` //webadmin,webclient,app,
DeviceId string `json:"device_id"`
DeviceId string `json:"device_id"`
Uuid string `json:"uuid"`
Ip string `json:"ip"`
Type string `json:"type"` //account,oauth
Platform string `json:"platform"` //windows,linux,mac,android,ios
UserTokenId uint `json:"user_token_id" gorm:"default:0;not null;"`
IsDeleted uint `json:"is_deleted" gorm:"default:0;not null;"`
TimeModel
}
@@ -24,6 +25,11 @@ const (
LoginLogTypeOauth = "oauth"
)
const (
IsDeletedNo = 0
IsDeletedYes = 1
)
type LoginLogList struct {
LoginLogs []*LoginLog `json:"list"`
Pagination