Files
baiyue-firstleg/audit-service/src/main/java/com/baiyue/audit/dto/AuditLogResponses.java
T
2026-08-14 16:06:27 +08:00

68 lines
2.0 KiB
Java

package com.baiyue.audit.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.Instant;
import java.time.LocalDateTime;
/** 平台审计日志查询响应。列表刻意不包含前后快照,详情才返回完整证据。 */
public final class AuditLogResponses {
private AuditLogResponses() {
}
@Schema(name = "AuditLogListItem", description = "操作日志列表项,不包含变更前后快照")
public record ListItem(
Long id,
String eventId,
String eventType,
String resourceType,
String resourceId,
String description,
Long accountId,
Long operatorTenantId,
Long userId,
String username,
String appCode,
String clientType,
String clientIp,
String requestId,
String traceId,
String serviceName,
Boolean success,
String errorCode,
String errorMessage,
Instant occurredAt,
LocalDateTime createdAt) {
}
@Schema(name = "AuditLogDetail", description = "操作日志详情,包含已脱敏的变更前后快照")
public record Detail(
Long id,
String eventId,
String eventType,
String resourceType,
String resourceId,
String description,
String requestId,
String traceId,
Long accountId,
Long operatorTenantId,
Long userId,
String username,
String appCode,
String clientType,
String httpMethod,
String requestUri,
String clientIp,
Long durationMs,
Boolean success,
String errorCode,
String errorMessage,
String beforeData,
String afterData,
String serviceName,
Instant occurredAt,
LocalDateTime createdAt) {
}
}