package com.mortals.xhx.module.door.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.door.model.vo.DoorVo;
import lombok.Data;
/**
 * 门禁设备实体对象
 *
 * @author zxfei
 * @date 2024-03-18
 */
@Data
public class DoorEntity extends DoorVo {
    private static final long serialVersionUID = 1L;

    /**
     * 设备名称
     */
    private String deviceName;
    /**
     * 设备编码
     */
    private String deviceCode;
    /**
     * Ip地址
     */
    private String ip;
    /**
     * 端口
     */
    private Integer port;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 所属部门id
     */
    private String deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 备注
     */
    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 DoorEntity) {
            DoorEntity tmp = (DoorEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.deviceName = "";
        this.deviceCode = "";
        this.ip = "";
        this.port = 0;
        this.username = "";
        this.password = "";
        this.deptId = "";
        this.deptName = "";
        this.remark = "";
    }
}