package com.mortals.xhx.module.device.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
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.DeviceFileVo;
import lombok.Data;
/**
* 设备图片信息实体对象
*
* @author zxfei
* @date 2023-12-04
*/
@Data
public class DeviceFileEntity extends DeviceFileVo {
    private static final long serialVersionUID = 1L;

    /**
    * 设备id
    */
    private Long deviceId;
    /**
    * 设备编码
    */
    @Excel(name = "设备编码")
    private String deviceCode;
    /**
    * 设备名称
    */
    @Excel(name = "设备名称")
    private String deviceName;
    /**
    * 文件名称
    */
    @Excel(name = "文件名称")
    private String fileName;
    /**
    * 文件相对路径地址
    */
    @Excel(name = "文件相对路径地址")
    private String filePath;
    /**
    * 备注
    */
    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 DeviceFileEntity) {
            DeviceFileEntity tmp = (DeviceFileEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.deviceId = null;
            this.deviceCode = "";
            this.deviceName = "";
            this.fileName = "";
            this.filePath = "";
            this.remark = "";
    }
}