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.DeviceModuleVo;
/**
* 设备模块信息实体对象
*
* @author zxfei
* @date 2022-07-02
*/

public class DeviceModuleEntity extends DeviceModuleVo {
    private static final long serialVersionUID = 1L;

    /**
    * 模块名称
    */
    private String moduleName;
    /**
    * 模块消息编码，与上报消息头编码一致，唯一
    */
    private String moduleMsgCode;



    public DeviceModuleEntity(){}
    /**
    * 获取 模块名称
    * @return String
    */
    public String getModuleName(){
        return moduleName;
    }
    /**
    * 设置 模块名称
    * @param moduleName
    */
    public void setModuleName(String moduleName){
        this.moduleName = moduleName;
    }
    /**
    * 获取 模块消息编码，与上报消息头编码一致，唯一
    * @return String
    */
    public String getModuleMsgCode(){
        return moduleMsgCode;
    }
    /**
    * 设置 模块消息编码，与上报消息头编码一致，唯一
    * @param moduleMsgCode
    */
    public void setModuleMsgCode(String moduleMsgCode){
        this.moduleMsgCode = moduleMsgCode;
    }




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

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",moduleName:").append(getModuleName());
        sb.append(",moduleMsgCode:").append(getModuleMsgCode());
        return sb.toString();
    }

    public void initAttrValue(){

            this.moduleName = "";

            this.moduleMsgCode = "";
    }
}