16 lines
690 B
Java
16 lines
690 B
Java
package com.baiyue.common.audit;
|
|
|
|
import java.time.Instant;
|
|
|
|
/**
|
|
* 跨服务业务审计事件契约,记录操作对象、操作者、租户、请求上下文、执行结果和变更快照。
|
|
*/
|
|
public record AuditEvent(
|
|
String eventId, String eventType, String resourceType, String resourceId, String description,
|
|
String requestId, String traceId, Long tenantId, 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, Instant occurredAt, String serviceName
|
|
) { }
|