package com.ruoyi.monitor.domain;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 审计日志对象 dc_audit_log
 * 
 * @author ruoyi
 * @date 2024-12-19
 */
public class AuditLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 日志ID */
    private Long logId;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private String operationType;

    /** 操作模块 */
    @Excel(name = "操作模块")
    private String operationModule;

    /** 操作描述 */
    @Excel(name = "操作描述")
    private String operationDescription;

    /** 操作用户ID */
    @Excel(name = "操作用户ID")
    private Long userId;

    /** 操作用户名 */
    @Excel(name = "操作用户名")
    private String userName;

    /** 操作IP地址 */
    @Excel(name = "操作IP地址")
    private String ipAddress;

    /** 用户代理 */
    private String userAgent;

    /** 请求URI */
    private String requestUri;

    /** 请求方法 */
    private String requestMethod;

    /** 请求参数 */
    private String requestParams;

    /** 响应结果 */
    private String responseResult;

    /** 操作状态(0正常 1异常) */
    @Excel(name = "操作状态", readConverterExp = "0=正常,1=异常")
    private String status;

    /** 错误消息 */
    private String errorMsg;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;

    /** 执行时长(毫秒) */
    @Excel(name = "执行时长")
    private Long executionTime;

    /** 业务数据ID */
    private String businessId;

    /** 业务数据类型 */
    private String businessType;

    /** 数据变更前 */
    private String dataBefore;

    /** 数据变更后 */
    private String dataAfter;

    /** 风险等级(LOW/MEDIUM/HIGH/CRITICAL) */
    @Excel(name = "风险等级")
    private String riskLevel;

    /** 会话ID */
    private String sessionId;

    /** 设备指纹 */
    private String deviceFingerprint;

    /** 地理位置 */
    private String geoLocation;

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }

    public void setOperationType(String operationType) 
    {
        this.operationType = operationType;
    }

    public String getOperationType() 
    {
        return operationType;
    }

    public void setOperationModule(String operationModule) 
    {
        this.operationModule = operationModule;
    }

    public String getOperationModule() 
    {
        return operationModule;
    }

    public void setOperationDescription(String operationDescription) 
    {
        this.operationDescription = operationDescription;
    }

    public String getOperationDescription() 
    {
        return operationDescription;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }

    public void setUserAgent(String userAgent) 
    {
        this.userAgent = userAgent;
    }

    public String getUserAgent() 
    {
        return userAgent;
    }

    public void setRequestUri(String requestUri) 
    {
        this.requestUri = requestUri;
    }

    public String getRequestUri() 
    {
        return requestUri;
    }

    public void setRequestMethod(String requestMethod) 
    {
        this.requestMethod = requestMethod;
    }

    public String getRequestMethod() 
    {
        return requestMethod;
    }

    public void setRequestParams(String requestParams) 
    {
        this.requestParams = requestParams;
    }

    public String getRequestParams() 
    {
        return requestParams;
    }

    public void setResponseResult(String responseResult) 
    {
        this.responseResult = responseResult;
    }

    public String getResponseResult() 
    {
        return responseResult;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }

    public void setOperationTime(Date operationTime) 
    {
        this.operationTime = operationTime;
    }

    public Date getOperationTime() 
    {
        return operationTime;
    }

    public void setExecutionTime(Long executionTime) 
    {
        this.executionTime = executionTime;
    }

    public Long getExecutionTime() 
    {
        return executionTime;
    }

    public void setBusinessId(String businessId) 
    {
        this.businessId = businessId;
    }

    public String getBusinessId() 
    {
        return businessId;
    }

    public void setBusinessType(String businessType) 
    {
        this.businessType = businessType;
    }

    public String getBusinessType() 
    {
        return businessType;
    }

    public void setDataBefore(String dataBefore) 
    {
        this.dataBefore = dataBefore;
    }

    public String getDataBefore() 
    {
        return dataBefore;
    }

    public void setDataAfter(String dataAfter) 
    {
        this.dataAfter = dataAfter;
    }

    public String getDataAfter() 
    {
        return dataAfter;
    }

    public void setRiskLevel(String riskLevel) 
    {
        this.riskLevel = riskLevel;
    }

    public String getRiskLevel() 
    {
        return riskLevel;
    }

    public void setSessionId(String sessionId) 
    {
        this.sessionId = sessionId;
    }

    public String getSessionId() 
    {
        return sessionId;
    }

    public void setDeviceFingerprint(String deviceFingerprint) 
    {
        this.deviceFingerprint = deviceFingerprint;
    }

    public String getDeviceFingerprint() 
    {
        return deviceFingerprint;
    }

    public void setGeoLocation(String geoLocation) 
    {
        this.geoLocation = geoLocation;
    }

    public String getGeoLocation() 
    {
        return geoLocation;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("operationType", getOperationType())
            .append("operationModule", getOperationModule())
            .append("operationDescription", getOperationDescription())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("ipAddress", getIpAddress())
            .append("userAgent", getUserAgent())
            .append("requestUri", getRequestUri())
            .append("requestMethod", getRequestMethod())
            .append("requestParams", getRequestParams())
            .append("responseResult", getResponseResult())
            .append("status", getStatus())
            .append("errorMsg", getErrorMsg())
            .append("operationTime", getOperationTime())
            .append("executionTime", getExecutionTime())
            .append("businessId", getBusinessId())
            .append("businessType", getBusinessType())
            .append("dataBefore", getDataBefore())
            .append("dataAfter", getDataAfter())
            .append("riskLevel", getRiskLevel())
            .append("sessionId", getSessionId())
            .append("deviceFingerprint", getDeviceFingerprint())
            .append("geoLocation", getGeoLocation())
            .toString();
    }
}