2022-08-16 23:30:23 +08:00
|
|
|
package dto
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2022-11-15 17:20:57 +08:00
|
|
|
type OperationLog struct {
|
2023-02-07 18:48:32 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
Source string `json:"source"`
|
2022-08-16 23:30:23 +08:00
|
|
|
|
|
|
|
IP string `json:"ip"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Method string `json:"method"`
|
|
|
|
UserAgent string `json:"userAgent"`
|
|
|
|
|
2022-12-13 18:54:28 +08:00
|
|
|
Latency time.Duration `json:"latency"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Message string `json:"message"`
|
2022-08-16 23:30:23 +08:00
|
|
|
|
2022-12-13 18:54:28 +08:00
|
|
|
DetailZH string `json:"detailZH"`
|
|
|
|
DetailEN string `json:"detailEN"`
|
2022-08-16 23:30:23 +08:00
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
}
|
2022-11-15 17:20:57 +08:00
|
|
|
|
2023-02-07 18:48:32 +08:00
|
|
|
type SearchOpLogWithPage struct {
|
|
|
|
PageInfo
|
|
|
|
Source string `json:"source"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Operation string `json:"operation"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SearchLgLogWithPage struct {
|
|
|
|
PageInfo
|
|
|
|
IP string `json:"ip"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
}
|
|
|
|
|
2022-11-15 17:20:57 +08:00
|
|
|
type LoginLog struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
IP string `json:"ip"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Agent string `json:"agent"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
}
|
2023-01-04 22:31:51 +08:00
|
|
|
|
|
|
|
type CleanLog struct {
|
|
|
|
LogType string `json:"logType" validate:"required,oneof=login operation"`
|
|
|
|
}
|