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.DeviceVo;
import lombok.Data;
/**
* 考勤机管理实体对象
*
* @author zxfei
* @date 2025-04-09
*/
@Data
public class DeviceEntity extends DeviceVo {
    private static final long serialVersionUID = 1L;

    /**
    * 设备名称
    */
    private String deviceName;
    /**
    * 设备编码
    */
    private String deviceCode;
    /**
    * 设备类型1考勤机
    */
    private Integer deviceType;
    /**
    * Mac地址
    */
    private String deviceMac;
    /**
    * 设备厂商
    */
    private String deviceFirmname;
    /**
    * 设备型号
    */
    private String modelNum;
    /**
    * 设备IP地址
    */
    private String ip;
    /**
    * 端口号
    */
    private String port;
    /**
    * 设备分辨率
    */
    private String resolution;
    /**
    * 负责人
    */
    private String leadingOfficial;
    /**
    * 负责人电话
    */
    private String telephone;
    /**
    * 设备经度
    */
    private String longitude;
    /**
    * 设备纬度
    */
    private String latitude;
    /**
    * 所在楼宇
    */
    private Integer building;
    /**
    * 所在楼层
    */
    private Integer floor;
    /**
    * 设备地址
    */
    private String address;
    /**
    * 管理员账号
    */
    private String manageUser;
    /**
    * 管理员密码
    */
    private String managePWD;
    /**
    * 备注
    */
    private String remark;
    /**
    * 设备状态，0：未激活，1：离线:2：在线
    */
    private Integer status;
    /**
    * 启停状态，0：停用,1：启用
    */
    private Integer enabled;
    @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 void initAttrValue(){
            this.deviceName = "";
            this.deviceCode = "";
            this.deviceType = 1;
            this.deviceMac = "";
            this.deviceFirmname = "";
            this.modelNum = "";
            this.ip = "";
            this.port = "";
            this.resolution = "";
            this.leadingOfficial = "";
            this.telephone = "";
            this.longitude = "";
            this.latitude = "";
            this.building = 0;
            this.floor = 0;
            this.address = "";
            this.manageUser = "";
            this.managePWD = "";
            this.remark = "";
            this.status = 0;
            this.enabled = 0;
    }
}