package com.mortals.xhx.module.room.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.room.model.vo.RoomDeviceVo;
import lombok.Data;
/**
* 房间设备信息实体对象
*
* @author zxfei
* @date 2023-05-29
*/
@Data
public class RoomDeviceEntity extends RoomDeviceVo {
    private static final long serialVersionUID = 1L;

    /**
    * 房间id
    */
    private Long roomId;
    /**
    * 房间名称
    */
    private String roomName;
    /**
    * 设备id
    */
    private Long deviceId;
    /**
    * 设备编码
    */
    private String deviceCode;
    /**
    * 设备名称
    */
    private String deviceName;
    /**
    * 备注
    */
    private String remark;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof RoomDeviceEntity) {
            RoomDeviceEntity tmp = (RoomDeviceEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.roomId = -1L;

            this.roomName = "";

            this.deviceId = -1L;

            this.deviceCode = "";

            this.deviceName = "";

            this.remark = "";
    }
}