package com.zd.common.core.domain.hazard;

import com.zd.common.core.enums.HardwareOperate;
import io.swagger.annotations.ApiModelProperty;

/**
 * 设备
 *
 * @Author: zhoupan
 * @Date: 2021/09/17/14:01
 * @Description:
 */
public abstract class BaseHardware {
    @ApiModelProperty("业务ID")
    String id;

    /**
     * 设备唯一编码
     *
     * @return
     */
    @ApiModelProperty("设备唯一编码")
    String hardwareNUM;

    /**
     * 设备状态
     */
    @ApiModelProperty("设备状态")
    HardwareOperate state;

    /**
     * 设备名称
     */
    @ApiModelProperty("设备名称")
    String hardwareName;


    @ApiModelProperty("硬件状态（融合了开关状态）")
    public HardwareOperate getState() {
        return state;
    }

    public void setState(HardwareOperate state) {
        this.state = state;
    }

    /**
     * 所属实验室ID
     */
    @ApiModelProperty("所属实验室ID")
    Long subId;

    public Long getSubId() {
        return subId;
    }

    public void setSubId(Long subId) {
        this.subId = subId;
    }

    public String getId() {
        return id;
    }

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

    /**
     * 设备类型
     *
     * @return
     */
    protected abstract HardwareType hardwareType();

    public String getHardwareNUM() {
        return hardwareNUM;
    }

    public void setHardwareNUM(String hardwareNUM) {
        this.hardwareNUM = hardwareNUM;
    }

    public String getHardwareName() {
        return hardwareName;
    }

    public void setHardwareName(String hardwareName) {
        this.hardwareName = hardwareName;
    }
}
