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.DeviceModuleUseVo;
/**
 * 设备模块使用频率实体对象
 *
 * @author zxfei
 * @date 2022-07-02
 */

public class DeviceModuleUseEntity extends DeviceModuleUseVo {
    private static final long serialVersionUID = 1L;

    /**
     * 模块名称
     */
    private String moduleName;
    /**
     * 模块消息编码
     */
    private String moduleMsgCode;
    /**
     * 所属设备
     */
    private Long deviceId;
    /**
     * 调用次数
     */
    private Long useNum;



    public DeviceModuleUseEntity(){}
    /**
     * 获取 模块名称
     * @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;
    }
    /**
     * 获取 所属设备
     * @return Long
     */
    public Long getDeviceId(){
        return deviceId;
    }
    /**
     * 设置 所属设备
     * @param deviceId
     */
    public void setDeviceId(Long deviceId){
        this.deviceId = deviceId;
    }
    /**
     * 获取 调用次数
     * @return Long
     */
    public Long getUseNum(){
        return useNum;
    }
    /**
     * 设置 调用次数
     * @param useNum
     */
    public void setUseNum(Long useNum){
        this.useNum = useNum;
    }




    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeviceModuleUseEntity) {
            DeviceModuleUseEntity tmp = (DeviceModuleUseEntity) 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());
        sb.append(",deviceId:").append(getDeviceId());
        sb.append(",useNum:").append(getUseNum());
        return sb.toString();
    }

    public void initAttrValue(){

        this.moduleName = "";

        this.moduleMsgCode = "";

        this.deviceId = null;

        this.useNum = null;
    }
}