package com.wdkl.ncs.android.middleware.model.dos;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.wdkl.ncs.android.middleware.model.annotation.Column;
import com.wdkl.ncs.android.middleware.model.annotation.Id;
import com.wdkl.ncs.android.middleware.model.annotation.PrimaryKeyField;
import com.wdkl.ncs.android.middleware.model.annotation.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

@Table(name = "ncs_device")
@ApiModel
@JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
public class DeviceDO implements Serializable {

    /**
     * null
     */
    @ApiModelProperty(value = "null", required = false)
    @Id(name = "id")
    private Integer id;
    /**
     * null
     */
    @Column(name = "union_id")
    @ApiModelProperty(value = "null", required = false)
    private String unionId;
    /**
     * null
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "null", required = false)
    private Long createTime;
    /**
     * null
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "null", required = false)
    private Long updateTime;
    /**
     * null
     */
    @Column(name = "part_id")
    @ApiModelProperty(value = "null", required = false)
    private Integer partId;
    /**
     * 数据同步时间
     */
    @Column(name = "sync_time")
    @ApiModelProperty(value = "数据同步时间", required = false)
    private Long syncTime;
    /**
     * 医院结构id
     */
    @Column(name = "frame_id")
    @ApiModelProperty(value = "医院结构id", required = false)
    private Integer frameId;
    /**
     * 注册设备类型：1：护士主机  2：医生主机  3：门口机  4：病床分机 5：LCD走廊屏  6：LED点阵屏  7：护士腕表  8：护工腕表  9：病人腕表  10：手机App
     */
    @Column(name = "device_type")
    @ApiModelProperty(value = "注册设备类型：1：护士主机  2：医生主机  3：门口机  4：病床分机 5：LCD走廊屏  6：LED点阵屏  7：移动设备  8：护工腕表  9：病人腕表  10：手机App", required = false)
    private Integer deviceType;
    /**
     * 注册设备出厂编号
     */
    @Column(name = "code")
    @ApiModelProperty(value = "注册设备出厂编号", required = false)
    private String code;
    /**
     * 设备型号
     */
    @Column(name = "model")
    @ApiModelProperty(value = "设备型号", required = false)
    private String model;
    /**
     * 设备软件版本信息
     */
    @Column(name = "soft_ver")
    @ApiModelProperty(value = "设备软件版本信息", required = false)
    private String softVer;
    /**
     * 设备硬件版本信息
     */
    @Column(name = "hard_ver")
    @ApiModelProperty(value = "设备硬件版本信息", required = false)
    private String hardVer;
    /**
     * 设备别名
     */
    @Column(name = "name")
    @ApiModelProperty(value = "设备别名", required = false)
    private String name;
    /**
     * 该设备的有线以太网卡MAC地址
     */
    @Column(name = "eth_mac")
    @ApiModelProperty(value = "该设备的有线以太网卡MAC地址", required = false)
    private String ethMac;
    /**
     * 该设备的有线以太网卡分配的IP地址
     */
    @Column(name = "eth_ip")
    @ApiModelProperty(value = "该设备的有线以太网卡分配的IP地址", required = false)
    private String ethIp;
    /**
     * 该设备的有线以太网卡分配的IP地址端口
     */
    @Column(name = "eth_ip_port")
    @ApiModelProperty(value = "该设备的有线以太网卡分配的IP地址端口", required = false)
    private String ethIpPort;
    /**
     * 该设备的WIFI网卡MAC地址
     */
    @Column(name = "wifi_mac")
    @ApiModelProperty(value = "该设备的WIFI网卡MAC地址", required = false)
    private String wifiMac;
    /**
     * 该设备的WIFI网卡分配的IP地址
     */
    @Column(name = "wifi_ip")
    @ApiModelProperty(value = "该设备的WIFI网卡分配的IP地址", required = false)
    private String wifiIp;
    /**
     * 该设备的WIFI热点名称
     */
    @Column(name = "wifi_hostname")
    @ApiModelProperty(value = "该设备的WIFI热点名称", required = false)
    private String wifiHostname;
    /**
     * wifi密码
     */
    @Column(name = "wifi_password")
    @ApiModelProperty(value = "wifi密码", required = false)
    private String wifiPassword;
    /**
     * 该设备是否启用状态:false：表示未启用，设备不进入主界面。true：表示已开启正常使用。
     */
    @Column(name = "status")
    @ApiModelProperty(value = "该设备是否启用状态:false：表示未启用，设备不进入主界面。true：表示已开启正常使用。", required = false)
    private Integer status;
    /**
     * SIP服务器IP地址
     */
    @Column(name = "sip_ip")
    @ApiModelProperty(value = "SIP服务器IP地址", required = false)
    private String sipIp;
    /**
     * 分配给该设备的SIP账号
     */
    @Column(name = "sip_id")
    @ApiModelProperty(value = "分配给该设备的SIP账号", required = false)
    private String sipId;
    /**
     * 分配给该设备的SIP密码
     */
    @Column(name = "sip_password")
    @ApiModelProperty(value = "分配给该设备的SIP密码", required = false)
    private String sipPassword;
    /**
     * 表示SIP账号状态:true：可以使用   false：暂停使用
     */
    @Column(name = "sip_status")
    @ApiModelProperty(value = "表示SIP账号状态:true：可以使用   false：暂停使用", required = false)
    private Boolean sipStatus;
    /**
     * null
     */
    @Column(name = "member_id", allowNullUpdate = true)
    @ApiModelProperty(value = "null", required = false)
    private Integer memberId;
    /**
     * 是否为后备，空或否时为并行
     */
    @Column(name = "bool_backup")
    @ApiModelProperty(value = "是否为后备，空或否时为并行", required = false)
    private Boolean boolBackup;
    /**
     * 后备哪个设备，设备id
     */
    @Column(name = "backup_id")
    @ApiModelProperty(value = "后备哪个设备，设备id", required = false)
    private Integer backupId;
    /**
     * null
     */
    @Column(name = "priority")
    @ApiModelProperty(value = "null", required = false)
    private Integer priority;

    @Column(name = "config")
    @ApiModelProperty(value = "设备配置信息，看板设备有配置内容，已json格式存储", required = false)
    private String config; //

    /**
     * roleId
     */
    @Column(name = "role_id", allowNullUpdate = true)
    @ApiModelProperty(value = "roleId", required = false)
    private Integer roleId;


    @PrimaryKeyField
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }


    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }


    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getPartId() {
        return partId;
    }

    public void setPartId(Integer partId) {
        this.partId = partId;
    }


    public Long getSyncTime() {
        return syncTime;
    }

    public void setSyncTime(Long syncTime) {
        this.syncTime = syncTime;
    }


    public Integer getFrameId() {
        return frameId;
    }

    public void setFrameId(Integer frameId) {
        this.frameId = frameId;
    }


    public Integer getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(Integer deviceType) {
        this.deviceType = deviceType;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }


    public String getSoftVer() {
        return softVer;
    }

    public void setSoftVer(String softVer) {
        this.softVer = softVer;
    }


    public String getHardVer() {
        return hardVer;
    }

    public void setHardVer(String hardVer) {
        this.hardVer = hardVer;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getEthMac() {
        return ethMac;
    }

    public void setEthMac(String ethMac) {
        this.ethMac = ethMac;
    }


    public String getEthIp() {
        return ethIp;
    }

    public void setEthIp(String ethIp) {
        this.ethIp = ethIp;
    }


    public String getEthIpPort() {
        return ethIpPort;
    }

    public void setEthIpPort(String ethIpPort) {
        this.ethIpPort = ethIpPort;
    }

    public String getWifiMac() {
        return wifiMac;
    }

    public void setWifiMac(String wifiMac) {
        this.wifiMac = wifiMac;
    }


    public String getWifiIp() {
        return wifiIp;
    }

    public void setWifiIp(String wifiIp) {
        this.wifiIp = wifiIp;
    }


    public String getWifiHostname() {
        return wifiHostname;
    }

    public void setWifiHostname(String wifiHostname) {
        this.wifiHostname = wifiHostname;
    }


    public String getWifiPassword() {
        return wifiPassword;
    }

    public void setWifiPassword(String wifiPassword) {
        this.wifiPassword = wifiPassword;
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getSipIp() {
        return sipIp;
    }

    public void setSipIp(String sipIp) {
        this.sipIp = sipIp;
    }


    public String getSipId() {
        return sipId;
    }

    public void setSipId(String sipId) {
        this.sipId = sipId;
    }

    public String getSipPassword() {
        return sipPassword;
    }

    public void setSipPassword(String sipPassword) {
        this.sipPassword = sipPassword;
    }


    public Integer getMemberId() {
        return memberId;
    }

    public void setMemberId(Integer memberId) {
        this.memberId = memberId;
    }


    public Boolean getSipStatus() {
        return sipStatus;
    }

    public void setSipStatus(Boolean sipStatus) {
        this.sipStatus = sipStatus;
    }

    public Boolean getBoolBackup() {
        return boolBackup;
    }

    public void setBoolBackup(Boolean boolBackup) {
        this.boolBackup = boolBackup;
    }

    public Integer getBackupId() {
        return backupId;
    }

    public void setBackupId(Integer backupId) {
        this.backupId = backupId;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getConfig() {
        return config;
    }

    public void setConfig(String config) {
        this.config = config;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceDO deviceDO = (DeviceDO) o;
        return Objects.equals(id, deviceDO.id) &&
                Objects.equals(unionId, deviceDO.unionId) &&
                Objects.equals(createTime, deviceDO.createTime) &&
                Objects.equals(updateTime, deviceDO.updateTime) &&
                Objects.equals(partId, deviceDO.partId) &&
                Objects.equals(syncTime, deviceDO.syncTime) &&
                Objects.equals(frameId, deviceDO.frameId) &&
                Objects.equals(deviceType, deviceDO.deviceType) &&
                Objects.equals(code, deviceDO.code) &&
                Objects.equals(model, deviceDO.model) &&
                Objects.equals(softVer, deviceDO.softVer) &&
                Objects.equals(hardVer, deviceDO.hardVer) &&
                Objects.equals(name, deviceDO.name) &&
                Objects.equals(ethMac, deviceDO.ethMac) &&
                Objects.equals(ethIp, deviceDO.ethIp) &&
                Objects.equals(ethIpPort, deviceDO.ethIpPort) &&
                Objects.equals(wifiMac, deviceDO.wifiMac) &&
                Objects.equals(wifiIp, deviceDO.wifiIp) &&
                Objects.equals(wifiHostname, deviceDO.wifiHostname) &&
                Objects.equals(wifiPassword, deviceDO.wifiPassword) &&
                Objects.equals(status, deviceDO.status) &&
                Objects.equals(sipIp, deviceDO.sipIp) &&
                Objects.equals(sipId, deviceDO.sipId) &&
                Objects.equals(sipPassword, deviceDO.sipPassword) &&
                Objects.equals(sipStatus, deviceDO.sipStatus) &&
                Objects.equals(memberId, deviceDO.memberId) &&
                Objects.equals(boolBackup, deviceDO.boolBackup) &&
                Objects.equals(backupId, deviceDO.backupId) &&
                Objects.equals(priority, deviceDO.priority) &&
                Objects.equals(config, deviceDO.config) &&
                Objects.equals(roleId, deviceDO.roleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, unionId, createTime, updateTime, partId, syncTime, frameId, deviceType, code, model, softVer, hardVer, name, ethMac, ethIp, ethIpPort, wifiMac, wifiIp, wifiHostname, wifiPassword, status, sipIp, sipId, sipPassword, sipStatus, memberId, boolBackup, backupId, priority, config, roleId);
    }
}
