package com.yushu.system.domain;

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

import java.util.Date;

/**
 * 错误日志对象 sys_error_log
 * 
 * @author yushu
 */
public class SysErrorLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 错误ID */
    private Long errorId;

    /** 错误代码 */
    private String errorCode;

    /** 错误类型: SYSTEM/BUSINESS/API/SQL/AUTH */
    private String errorType;

    /** 错误级别: ERROR/WARN/FATAL */
    private String errorLevel;

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

    /** 错误详情(堆栈信息) */
    private String errorDetail;

    /** 请求URL */
    private String requestUrl;

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

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

    /** 请求IP */
    private String requestIp;

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

    /** 用户ID */
    private Long userId;

    /** 用户名 */
    private String userName;

    /** 来源类 */
    private String sourceClass;

    /** 来源方法 */
    private String sourceMethod;

    /** 来源行号 */
    private Integer sourceLine;

    /** 状态: 0=未处理 1=已处理 2=忽略 */
    private String status;

    /** 处理人 */
    private String resolveBy;

    /** 处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date resolveTime;

    /** 处理备注 */
    private String resolveRemark;

    /** 发生次数 */
    private Integer occurCount;

    /** 首次发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date firstTime;

    /** 最近发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastTime;

    // Getters and Setters
    public Long getErrorId() {
        return errorId;
    }

    public void setErrorId(Long errorId) {
        this.errorId = errorId;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorType() {
        return errorType;
    }

    public void setErrorType(String errorType) {
        this.errorType = errorType;
    }

    public String getErrorLevel() {
        return errorLevel;
    }

    public void setErrorLevel(String errorLevel) {
        this.errorLevel = errorLevel;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getErrorDetail() {
        return errorDetail;
    }

    public void setErrorDetail(String errorDetail) {
        this.errorDetail = errorDetail;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

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

    public String getRequestParams() {
        return requestParams;
    }

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

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getUserAgent() {
        return userAgent;
    }

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

    public Long getUserId() {
        return userId;
    }

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

    public String getUserName() {
        return userName;
    }

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

    public String getSourceClass() {
        return sourceClass;
    }

    public void setSourceClass(String sourceClass) {
        this.sourceClass = sourceClass;
    }

    public String getSourceMethod() {
        return sourceMethod;
    }

    public void setSourceMethod(String sourceMethod) {
        this.sourceMethod = sourceMethod;
    }

    public Integer getSourceLine() {
        return sourceLine;
    }

    public void setSourceLine(Integer sourceLine) {
        this.sourceLine = sourceLine;
    }

    public String getStatus() {
        return status;
    }

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

    public String getResolveBy() {
        return resolveBy;
    }

    public void setResolveBy(String resolveBy) {
        this.resolveBy = resolveBy;
    }

    public Date getResolveTime() {
        return resolveTime;
    }

    public void setResolveTime(Date resolveTime) {
        this.resolveTime = resolveTime;
    }

    public String getResolveRemark() {
        return resolveRemark;
    }

    public void setResolveRemark(String resolveRemark) {
        this.resolveRemark = resolveRemark;
    }

    public Integer getOccurCount() {
        return occurCount;
    }

    public void setOccurCount(Integer occurCount) {
        this.occurCount = occurCount;
    }

    public Date getFirstTime() {
        return firstTime;
    }

    public void setFirstTime(Date firstTime) {
        this.firstTime = firstTime;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }
}
