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

import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.device.model.vo.DeviceLogVo;
/**
 * 设备日志实体对象
 *
 * @author zxfei
 * @date 2022-08-22
 */

public class DeviceLogEntity extends DeviceLogVo {
    private static final long serialVersionUID = 1L;

    /**
     * traceId,日志追踪id
     */
    private String traceID;
    /**
     * 站点Id，来源基础服务平台
     */
    private Long siteId;
    /**
     * 设备ID
     */
    private Long deviceId;
    /**
     * 设备编号
     */
    private String deviceCode;
    /**
     * 设备名称，设置设备名称。
     */
    private String deviceName;
    /**
     * 业务消息头标识
     */
    private String messageHead;
    /**
     * 消息类型，(0.上行，1.下行)
     */
    private Integer logType;
    /**
     * 内容
     */
    private String content;



    public DeviceLogEntity(){}
    /**
     * 获取 traceId,日志追踪id
     * @return String
     */
    public String getTraceID(){
        return traceID;
    }
    /**
     * 设置 traceId,日志追踪id
     * @param traceID
     */
    public void setTraceID(String traceID){
        this.traceID = traceID;
    }
    /**
     * 获取 站点Id，来源基础服务平台
     * @return Long
     */
    public Long getSiteId(){
        return siteId;
    }
    /**
     * 设置 站点Id，来源基础服务平台
     * @param siteId
     */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
     * 获取 设备ID
     * @return Long
     */
    public Long getDeviceId(){
        return deviceId;
    }
    /**
     * 设置 设备ID
     * @param deviceId
     */
    public void setDeviceId(Long deviceId){
        this.deviceId = deviceId;
    }
    /**
     * 获取 设备编号
     * @return String
     */
    public String getDeviceCode(){
        return deviceCode;
    }
    /**
     * 设置 设备编号
     * @param deviceCode
     */
    public void setDeviceCode(String deviceCode){
        this.deviceCode = deviceCode;
    }
    /**
     * 获取 设备名称，设置设备名称。
     * @return String
     */
    public String getDeviceName(){
        return deviceName;
    }
    /**
     * 设置 设备名称，设置设备名称。
     * @param deviceName
     */
    public void setDeviceName(String deviceName){
        this.deviceName = deviceName;
    }
    /**
     * 获取 业务消息头标识
     * @return String
     */
    public String getMessageHead(){
        return messageHead;
    }
    /**
     * 设置 业务消息头标识
     * @param messageHead
     */
    public void setMessageHead(String messageHead){
        this.messageHead = messageHead;
    }
    /**
     * 获取 消息类型，(0.上行，1.下行)
     * @return Integer
     */
    public Integer getLogType(){
        return logType;
    }
    /**
     * 设置 消息类型，(0.上行，1.下行)
     * @param logType
     */
    public void setLogType(Integer logType){
        this.logType = logType;
    }
    /**
     * 获取 内容
     * @return String
     */
    public String getContent(){
        return content;
    }
    /**
     * 设置 内容
     * @param content
     */
    public void setContent(String content){
        this.content = content;
    }




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

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",traceID:").append(getTraceID());
        sb.append(",siteId:").append(getSiteId());
        sb.append(",deviceId:").append(getDeviceId());
        sb.append(",deviceCode:").append(getDeviceCode());
        sb.append(",deviceName:").append(getDeviceName());
        sb.append(",messageHead:").append(getMessageHead());
        sb.append(",logType:").append(getLogType());
        sb.append(",content:").append(getContent());
        return sb.toString();
    }

    public void initAttrValue(){

        this.traceID = "";

        this.siteId = null;

        this.deviceId = null;

        this.deviceCode = "";

        this.deviceName = "";

        this.messageHead = "";

        this.logType = null;

        this.content = "";
    }
}