2025-12-30 16:14:15 +08:00
|
|
|
|
package dto
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2026-06-10 15:01:13 +08:00
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
2025-12-30 16:14:15 +08:00
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
2026-01-16 16:55:32 +08:00
|
|
|
|
"github.com/gogf/gf/v2/os/gtime"
|
2025-12-30 16:14:15 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// ListLogsReq 查询操作日志列表请求(通用方法,支持根据不同条件动态查询)
|
|
|
|
|
|
type ListLogsReq struct {
|
|
|
|
|
|
g.Meta `path:"/listLogs" method:"get" tags:"操作日志" summary:"查询操作日志列表" dc:"根据多个条件查询操作日志列表"`
|
2026-01-16 16:55:32 +08:00
|
|
|
|
*beans.Page
|
2026-01-06 17:01:10 +08:00
|
|
|
|
ServiceName string `json:"service_name" dc:"服务名(可选)"`
|
|
|
|
|
|
Collection string `json:"collection" dc:"数据所在集合名称(可选)"`
|
|
|
|
|
|
CollectionID string `json:"collection_id" dc:"数据ID(可选)"`
|
|
|
|
|
|
Operation string `json:"operation" dc:"操作类型(可选)"`
|
|
|
|
|
|
StartTime string `json:"start_time" dc:"开始时间(可选)"`
|
|
|
|
|
|
EndTime string `json:"end_time" dc:"结束时间(可选)"`
|
|
|
|
|
|
OrderBy []beans.OrderBy `json:"orderBy" dc:"排序字段"`
|
2025-12-30 16:14:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ListLogsResp 查询操作日志列表响应
|
|
|
|
|
|
type ListLogsResp struct {
|
|
|
|
|
|
Logs []OperationLogInfo `json:"logs" dc:"日志列表"`
|
|
|
|
|
|
Total int64 `json:"total" dc:"总数"`
|
|
|
|
|
|
}
|
2026-01-16 16:55:32 +08:00
|
|
|
|
|
|
|
|
|
|
// OperationLogInfo 操作日志信息
|
|
|
|
|
|
type OperationLogInfo struct {
|
|
|
|
|
|
ID string `json:"id" dc:"日志ID"`
|
|
|
|
|
|
ServiceName string `json:"service_name" dc:"服务名"`
|
|
|
|
|
|
Collection string `json:"collection" dc:"数据所在集合名称"`
|
|
|
|
|
|
CollectionID interface{} `json:"collection_id" dc:"数据ID"`
|
|
|
|
|
|
Operation string `json:"operation" dc:"操作类型"`
|
|
|
|
|
|
Creator string `json:"creator" dc:"操作人名称"`
|
|
|
|
|
|
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
|
|
|
|
Data interface{} `json:"data" dc:"当前数据"`
|
|
|
|
|
|
IPAddress string `json:"ip_address" dc:"操作IP地址"`
|
|
|
|
|
|
}
|