暂存提交
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
package com.baiyue.audit.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务审计日志持久化实体,对应 {@code sys_audit_log} 表。
|
||||
* 用于保存跨租户敏感操作的不可变审计证据,不用于领域事件投递。
|
||||
*/
|
||||
@Schema(name = "AuditLog", description = "Stored business audit log / 已存储业务审计日志")
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("sys_audit_log")
|
||||
public class AuditLogEntity {
|
||||
@Schema(description = "Audit log ID / 审计日志 ID", example = "190000000000000201")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String eventType;
|
||||
private String resourceType;
|
||||
private String resourceId;
|
||||
private String description;
|
||||
private String requestId;
|
||||
private String traceId;
|
||||
private Long tenantId;
|
||||
private Long operatorTenantId;
|
||||
private Long userId;
|
||||
private String username;
|
||||
private String appCode;
|
||||
private String clientType;
|
||||
private String httpMethod;
|
||||
private String requestUri;
|
||||
private String clientIp;
|
||||
private Long durationMs;
|
||||
private Boolean success;
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
private String beforeData;
|
||||
private String afterData;
|
||||
private String serviceName;
|
||||
private Instant occurredAt;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user