Files
GL.iNet-Yongping.Xie 53b95b71e6 feat: add device event logging with admin log viewer
- Record device online/offline, remote SSH, Web and Control sessions
- Add device_event_logs table with MAC, event type and time range indexes
- Distinguish remote_control vs remote_web by device client type
- Admin-only log page with device/access tabs, duration column and filters
- Permission-gated sidebar entry (device_log.read)

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2026-04-07 19:41:33 -07:00

20 lines
538 B
Go

package dto
type DeviceEventLog struct {
ID int64 `json:"id"`
DeviceMac string `json:"deviceMac"`
EventType string `json:"eventType"`
ActorName string `json:"actorName"`
ClientIP string `json:"clientIp"`
Detail string `json:"detail"`
CreatedAt int64 `json:"createdAt"`
EndedAt int64 `json:"endedAt"`
}
type ListDeviceEventLogsResp struct {
Items []DeviceEventLog `json:"items"`
Total int64 `json:"total"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
}