package cn.estsh.i3plus.pojo.platform.platbean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Description :
 * @Reference :
 * @Author : wei.peng
 * @CreateDate : 20-4-9 下午8:41
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Api(value="系统异常表",description = "记录系统出现的异常")
public class SysLogConsole extends BaseBean {


    private static final long serialVersionUID = -6073378683575266830L;
    /******** 服务器信息 ********/
    @ApiParam(value ="产品名称")
    private Integer softType;
    public String getSoftTypeTxt() {
        return softType == null ? null : CommonEnumUtil.SOFT_TYPE.valueOfDescription(softType);
    }

    @ApiParam(value ="服务器IP")
    private String logHost;

    @ApiParam(value ="应用PID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long logPid;

    @ApiParam(value ="应用端口")
    private Integer logPort;

    @ApiParam(value ="日志分组(日志记录器名称，getLogger方法的参数值)")
    private String logGroup;

    @ApiParam(value ="日志等级(OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL)")
    private String logLevel;

    @ApiParam(value ="操作类型(post,put,get)")
    private String logType;

    /******** 用户信息 ********/

    @ApiParam(value ="用户登录IP")
    private String userHost;

    @ApiParam(value ="用户登录浏览器")
    private String userBrowser;

    @ApiParam(value ="用户登录操作系统")
    private String userOs;

    @ApiParam(value ="账号ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @ApiParam(value ="用户登录名称")
    private String userLoginName;

    /******** 日志信息 ********/
    @ApiParam(value ="请求ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long requestId;

    @ApiParam(value ="执行线程")
    private String executeThreadId;

    @ApiParam(value ="执行Class")
    private String executeClassName;

    @ApiParam(value ="执行方法")
    private String executeMethod;

    @ApiParam(value ="报错行数")
    private Integer executeLineNumber;

    @ApiParam(value ="方法标题")
    private String executeTitle;

    @ApiParam(value ="执行参数")
    private String executeArgs;

    @ApiParam(value ="执行耗时")
    private Integer executeTime;

    @ApiParam(value ="执行状态")
    private String executeStatus;

    @ApiParam(value ="执行日志信息")
    private String executeMessage;

    @ApiParam(value ="执行异常堆栈信息")
    private String errorStackTrace;

}
