package com.mortals.xhx.module.biz.model;

import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.framework.CustomJsonDateDeserializer;
import com.mortals.xhx.module.biz.model.vo.BizLogVo;
/**
* 业务日志实体对象
*
* @author zxfei
* @date 2022-08-17
*/

public class BizLogEntity extends BizLogVo {
    private static final long serialVersionUID = 1L;

    /**
    * 追踪Id
    */
    private String traceID;
    /**
    * 应用名称
    */
    private String appName;
    /**
    * 实例IP
    */
    private String hostName;
    /**
    * 日志等级
    */
    private String logLevel;
    /**
    * 用户唯一标识
    */
    private String userCode;
    /**
    * 设备唯一标识
    */
    private String deviceCode;
    /**
    * 记录埋点的事件主题，方便实时计算或同步进行数据筛选
    */
    private String eventTopic;
    /**
    * 记录埋点中文名称
    */
    private String eventTopicName;
    /**
    * 事件参数，json
    */
    private String msg;
    /**
    * 日志产生时间
    */
    private Date logTime;



    public BizLogEntity(){}
    /**
    * 获取 追踪Id
    * @return String
    */
    public String getTraceID(){
        return traceID;
    }
    /**
    * 设置 追踪Id
    * @param traceID
    */
    public void setTraceID(String traceID){
        this.traceID = traceID;
    }
    /**
    * 获取 应用名称
    * @return String
    */
    public String getAppName(){
        return appName;
    }
    /**
    * 设置 应用名称
    * @param appName
    */
    public void setAppName(String appName){
        this.appName = appName;
    }
    /**
    * 获取 实例IP
    * @return String
    */
    public String getHostName(){
        return hostName;
    }
    /**
    * 设置 实例IP
    * @param hostName
    */
    public void setHostName(String hostName){
        this.hostName = hostName;
    }
    /**
    * 获取 日志等级
    * @return String
    */
    public String getLogLevel(){
        return logLevel;
    }
    /**
    * 设置 日志等级
    * @param logLevel
    */
    public void setLogLevel(String logLevel){
        this.logLevel = logLevel;
    }
    /**
    * 获取 用户唯一标识
    * @return String
    */
    public String getUserCode(){
        return userCode;
    }
    /**
    * 设置 用户唯一标识
    * @param userCode
    */
    public void setUserCode(String userCode){
        this.userCode = userCode;
    }
    /**
    * 获取 设备唯一标识
    * @return String
    */
    public String getDeviceCode(){
        return deviceCode;
    }
    /**
    * 设置 设备唯一标识
    * @param deviceCode
    */
    public void setDeviceCode(String deviceCode){
        this.deviceCode = deviceCode;
    }
    /**
    * 获取 记录埋点的事件主题，方便实时计算或同步进行数据筛选
    * @return String
    */
    public String getEventTopic(){
        return eventTopic;
    }
    /**
    * 设置 记录埋点的事件主题，方便实时计算或同步进行数据筛选
    * @param eventTopic
    */
    public void setEventTopic(String eventTopic){
        this.eventTopic = eventTopic;
    }
    /**
    * 获取 记录埋点中文名称
    * @return String
    */
    public String getEventTopicName(){
        return eventTopicName;
    }
    /**
    * 设置 记录埋点中文名称
    * @param eventTopicName
    */
    public void setEventTopicName(String eventTopicName){
        this.eventTopicName = eventTopicName;
    }
    /**
    * 获取 事件参数，json
    * @return String
    */
    public String getMsg(){
        return msg;
    }
    /**
    * 设置 事件参数，json
    * @param msg
    */
    public void setMsg(String msg){
        this.msg = msg;
    }
    /**
    * 获取 日志产生时间
    * @return Date
    */
    public Date getLogTime(){
        return logTime;
    }
    /**
    * 设置 日志产生时间
    * @param logTime
    */
    public void setLogTime(Date logTime){
        this.logTime = logTime;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof BizLogEntity) {
            BizLogEntity tmp = (BizLogEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",traceID:").append(getTraceID());
        sb.append(",appName:").append(getAppName());
        sb.append(",hostName:").append(getHostName());
        sb.append(",logLevel:").append(getLogLevel());
        sb.append(",userCode:").append(getUserCode());
        sb.append(",deviceCode:").append(getDeviceCode());
        sb.append(",eventTopic:").append(getEventTopic());
        sb.append(",eventTopicName:").append(getEventTopicName());
        sb.append(",msg:").append(getMsg());
        sb.append(",logTime:").append(getLogTime());
        return sb.toString();
    }

    public void initAttrValue(){

            this.traceID = "";

            this.appName = "";

            this.hostName = "";

            this.logLevel = "";

            this.userCode = "";

            this.deviceCode = "";

            this.eventTopic = "";

            this.eventTopicName = "";

            this.msg = "";

            this.logTime = null;
    }
}