2024-09-19 10:44:49 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
type LoginLog struct {
|
|
|
|
|
IdModel
|
2024-10-31 22:29:12 +08:00
|
|
|
UserId uint `json:"user_id" gorm:"default:0;not null;"`
|
|
|
|
|
Client string `json:"client"` //webadmin,webclient,app,
|
2024-11-02 05:42:47 +08:00
|
|
|
DeviceId string `json:"device_id"`
|
2024-10-31 22:29:12 +08:00
|
|
|
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;"`
|
2024-09-19 10:44:49 +08:00
|
|
|
TimeModel
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-31 15:14:30 +08:00
|
|
|
const (
|
|
|
|
|
LoginLogClientWebAdmin = "webadmin"
|
|
|
|
|
LoginLogClientWeb = "webclient"
|
|
|
|
|
LoginLogClientApp = "app"
|
|
|
|
|
)
|
|
|
|
|
|
2024-09-19 10:44:49 +08:00
|
|
|
const (
|
|
|
|
|
LoginLogTypeAccount = "account"
|
|
|
|
|
LoginLogTypeOauth = "oauth"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type LoginLogList struct {
|
|
|
|
|
LoginLogs []*LoginLog `json:"list"`
|
|
|
|
|
Pagination
|
|
|
|
|
}
|