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.DeviceVo;
/**
* 设备实体对象
*
* @author zxfei
* @date 2023-02-25
*/

public class DeviceEntity extends DeviceVo {
    private static final long serialVersionUID = 1L;

    /**
    * 设备id
    */
    private Long deviceId;
    /**
    * 设备名称
    */
    private String deviceName;
    /**
    * 设备编码
    */
    private String deviceCode;
    /**
    * 设备的MAC地址
    */
    private String deviceMac;
    /**
    * 站点Id
    */
    private Long siteId;
    /**
    * 站点编号，来源基础服务平台
    */
    private String siteCode;
    /**
    * 站点名称
    */
    private String siteName;
    /**
    * 产品编码
    */
    private String productCode;
    /**
    * 产品名称
    */
    private String productName;
    /**
    * 设备来源(0.子设备，1.网关设备，2.直连设备)
    */
    private Integer deviceSrc;
    /**
    * 经度
    */
    private String lon;
    /**
    * 纬度
    */
    private String lati;
    /**
    * 负责人
    */
    private String leadingOfficial;
    /**
    * 联系电话
    */
    private String leadingOfficialTelephone;
    /**
    * 设备状态 (0.未激活，1.离线,2.在线)
    */
    private Integer deviceStatus;
    /**
    * 备注
    */
    private String deviceRemark;
    /**
    * 设备来源(0.旧设备，1.新设备)
    */
    private Integer source;



    public DeviceEntity(){}
    /**
    * 获取 设备id
    * @return Long
    */
    public Long getDeviceId(){
        return deviceId;
    }
    /**
    * 设置 设备id
    * @param deviceId
    */
    public void setDeviceId(Long deviceId){
        this.deviceId = deviceId;
    }
    /**
    * 获取 设备名称
    * @return String
    */
    public String getDeviceName(){
        return deviceName;
    }
    /**
    * 设置 设备名称
    * @param deviceName
    */
    public void setDeviceName(String deviceName){
        this.deviceName = deviceName;
    }
    /**
    * 获取 设备编码
    * @return String
    */
    public String getDeviceCode(){
        return deviceCode;
    }
    /**
    * 设置 设备编码
    * @param deviceCode
    */
    public void setDeviceCode(String deviceCode){
        this.deviceCode = deviceCode;
    }
    /**
    * 获取 设备的MAC地址
    * @return String
    */
    public String getDeviceMac(){
        return deviceMac;
    }
    /**
    * 设置 设备的MAC地址
    * @param deviceMac
    */
    public void setDeviceMac(String deviceMac){
        this.deviceMac = deviceMac;
    }
    /**
    * 获取 站点Id
    * @return Long
    */
    public Long getSiteId(){
        return siteId;
    }
    /**
    * 设置 站点Id
    * @param siteId
    */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
    * 获取 站点编号，来源基础服务平台
    * @return String
    */
    public String getSiteCode(){
        return siteCode;
    }
    /**
    * 设置 站点编号，来源基础服务平台
    * @param siteCode
    */
    public void setSiteCode(String siteCode){
        this.siteCode = siteCode;
    }
    /**
    * 获取 站点名称
    * @return String
    */
    public String getSiteName(){
        return siteName;
    }
    /**
    * 设置 站点名称
    * @param siteName
    */
    public void setSiteName(String siteName){
        this.siteName = siteName;
    }
    /**
    * 获取 产品编码
    * @return String
    */
    public String getProductCode(){
        return productCode;
    }
    /**
    * 设置 产品编码
    * @param productCode
    */
    public void setProductCode(String productCode){
        this.productCode = productCode;
    }
    /**
    * 获取 产品名称
    * @return String
    */
    public String getProductName(){
        return productName;
    }
    /**
    * 设置 产品名称
    * @param productName
    */
    public void setProductName(String productName){
        this.productName = productName;
    }
    /**
    * 获取 设备来源(0.子设备，1.网关设备，2.直连设备)
    * @return Integer
    */
    public Integer getDeviceSrc(){
        return deviceSrc;
    }
    /**
    * 设置 设备来源(0.子设备，1.网关设备，2.直连设备)
    * @param deviceSrc
    */
    public void setDeviceSrc(Integer deviceSrc){
        this.deviceSrc = deviceSrc;
    }
    /**
    * 获取 经度
    * @return String
    */
    public String getLon(){
        return lon;
    }
    /**
    * 设置 经度
    * @param lon
    */
    public void setLon(String lon){
        this.lon = lon;
    }
    /**
    * 获取 纬度
    * @return String
    */
    public String getLati(){
        return lati;
    }
    /**
    * 设置 纬度
    * @param lati
    */
    public void setLati(String lati){
        this.lati = lati;
    }
    /**
    * 获取 负责人
    * @return String
    */
    public String getLeadingOfficial(){
        return leadingOfficial;
    }
    /**
    * 设置 负责人
    * @param leadingOfficial
    */
    public void setLeadingOfficial(String leadingOfficial){
        this.leadingOfficial = leadingOfficial;
    }
    /**
    * 获取 联系电话
    * @return String
    */
    public String getLeadingOfficialTelephone(){
        return leadingOfficialTelephone;
    }
    /**
    * 设置 联系电话
    * @param leadingOfficialTelephone
    */
    public void setLeadingOfficialTelephone(String leadingOfficialTelephone){
        this.leadingOfficialTelephone = leadingOfficialTelephone;
    }
    /**
    * 获取 设备状态 (0.未激活，1.离线,2.在线)
    * @return Integer
    */
    public Integer getDeviceStatus(){
        return deviceStatus;
    }
    /**
    * 设置 设备状态 (0.未激活，1.离线,2.在线)
    * @param deviceStatus
    */
    public void setDeviceStatus(Integer deviceStatus){
        this.deviceStatus = deviceStatus;
    }
    /**
    * 获取 备注
    * @return String
    */
    public String getDeviceRemark(){
        return deviceRemark;
    }
    /**
    * 设置 备注
    * @param deviceRemark
    */
    public void setDeviceRemark(String deviceRemark){
        this.deviceRemark = deviceRemark;
    }
    /**
    * 获取 设备来源(0.旧设备，1.新设备)
    * @return Integer
    */
    public Integer getSource(){
        return source;
    }
    /**
    * 设置 设备来源(0.旧设备，1.新设备)
    * @param source
    */
    public void setSource(Integer source){
        this.source = source;
    }




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

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",deviceId:").append(getDeviceId());
        sb.append(",deviceName:").append(getDeviceName());
        sb.append(",deviceCode:").append(getDeviceCode());
        sb.append(",deviceMac:").append(getDeviceMac());
        sb.append(",siteId:").append(getSiteId());
        sb.append(",siteCode:").append(getSiteCode());
        sb.append(",siteName:").append(getSiteName());
        sb.append(",productCode:").append(getProductCode());
        sb.append(",productName:").append(getProductName());
        sb.append(",deviceSrc:").append(getDeviceSrc());
        sb.append(",lon:").append(getLon());
        sb.append(",lati:").append(getLati());
        sb.append(",leadingOfficial:").append(getLeadingOfficial());
        sb.append(",leadingOfficialTelephone:").append(getLeadingOfficialTelephone());
        sb.append(",deviceStatus:").append(getDeviceStatus());
        sb.append(",deviceRemark:").append(getDeviceRemark());
        sb.append(",source:").append(getSource());
        return sb.toString();
    }

    public void initAttrValue(){

            this.deviceId = null;

            this.deviceName = null;

            this.deviceCode = null;

            this.deviceMac = null;

            this.siteId = null;

            this.siteCode = null;

            this.siteName = null;

            this.productCode = null;

            this.productName = null;

            this.deviceSrc = 2;

            this.lon = null;

            this.lati = null;

            this.leadingOfficial = null;

            this.leadingOfficialTelephone = null;

            this.deviceStatus = null;

            this.deviceRemark = null;

            this.source = 1;
    }
}