package com.koobietech.eas.mbg.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;

public class EasSysLogs implements Serializable {
    /**
     * 自增的主键
     *
     * @mbg.generated
     */
    @Schema(description = "自增的主键")
    private Integer id;

    /**
     * 记录日志的时间戳
     *
     * @mbg.generated
     */
    @Schema(description = "记录日志的时间戳")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date timestamp;

    /**
     * 日志级别
     *
     * @mbg.generated
     */
    @Schema(description = "日志级别")
    private String level;

    /**
     * 记录日志的代码名称或类名
     *
     * @mbg.generated
     */
    @Schema(description = "记录日志的代码名称或类名")
    private String logger;

    /**
     * 日志信息
     *
     * @mbg.generated
     */
    @Schema(description = "日志信息")
    private String message;

    /**
     * 如果日志记录了异常信息，可以将其存储在此列中
     *
     * @mbg.generated
     */
    @Schema(description = "如果日志记录了异常信息，可以将其存储在此列中")
    private String exception;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level == null ? null : level.trim();
    }

    public String getLogger() {
        return logger;
    }

    public void setLogger(String logger) {
        this.logger = logger == null ? null : logger.trim();
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message == null ? null : message.trim();
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception == null ? null : exception.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", timestamp=").append(timestamp);
        sb.append(", level=").append(level);
        sb.append(", logger=").append(logger);
        sb.append(", message=").append(message);
        sb.append(", exception=").append(exception);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}