package com.zd.laboratory.domain;

import com.zd.common.core.enums.HardwareTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zd.common.core.annotation.Excel;
import com.zd.common.core.web.domain.BaseEntity;

/**
 * 控制记录对象 lab_control
 *
 * @author zd
 * @date 2021-09-07
 */
@ApiModel("控制记录表")
public class LabControl extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /**
     * 触发方式（1. 预警自动，2. 手动）
     */
    @ApiModelProperty("触发方式（1. 预警自动，2. 手动）")
    @Excel(name = "触发方式", readConverterExp = "1=.,预=警自动，2.,手=动")
    private Integer triggerModes;

    /**
     * 控制类型（开启，关闭，字典表）
     */
    @ApiModelProperty("控制类型（开启，关闭，字典表）")
    @Excel(name = "控制类型", readConverterExp = "开=启，关闭，字典表")
    private Integer controlType;

    /**
     * 操作人id
     */
    @ApiModelProperty("操作人id")
    @Excel(name = "操作人id")
    private Long joinUserId;

    /**
     * 操作人姓名
     */
    @ApiModelProperty("操作人姓名")
    @Excel(name = "操作人姓名")
    private String userName;

    /**
     * 执行操作（如：修改，新增，删除）
     */
    @ApiModelProperty("执行操作（如：修改，新增，删除）")
    @Excel(name = "执行操作", readConverterExp = "如=：修改，新增，删除")
    private String operation;

    /**
     * 关联硬件设备id
     */
    @ApiModelProperty("关联硬件设备id")
    @Excel(name = "关联硬件设备id")
    private Long hardwareId;

    /**
     * 实验室id
     */
    @ApiModelProperty("实验室id")
    @Excel(name = "实验室id")
    private Long subjectId;

    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    @Excel(name = "部门id")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty("部门名称")
    @Excel(name = "部门名称")
    private String deptName;

    /**
     * 创建人（用于数据权限）
     */
    @ApiModelProperty("创建人（用于数据权限）")
    @Excel(name = "创建人", readConverterExp = "用=于数据权限")
    private Long userId;

    @ApiModelProperty("硬件类型")
    private HardwareTypeEnum hardwareType;

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

    public Long getId() {
        return id;
    }

    public void setTriggerModes(Integer triggerModes) {
        this.triggerModes = triggerModes;
    }

    public Integer getTriggerModes() {
        return triggerModes;
    }

    public void setControlType(Integer controlType) {
        this.controlType = controlType;
    }

    public Integer getControlType() {
        return controlType;
    }

    public void setJoinUserId(Long joinUserId) {
        this.joinUserId = joinUserId;
    }

    public Long getJoinUserId() {
        return joinUserId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getOperation() {
        return operation;
    }

    public void setHardwareId(Long hardwareId) {
        this.hardwareId = hardwareId;
    }

    public Long getHardwareId() {
        return hardwareId;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public HardwareTypeEnum getHardwareType() {
        return hardwareType;
    }

    public void setHardwareType(HardwareTypeEnum hardwareType) {
        this.hardwareType = hardwareType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("triggerModes", getTriggerModes())
                .append("controlType", getControlType())
                .append("joinUserId", getJoinUserId())
                .append("userName", getUserName())
                .append("operation", getOperation())
                .append("hardwareId", getHardwareId())
                .append("subjectId", getSubjectId())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("createTime", getCreateTime())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("hardwareType", getHardwareType())
                .toString();
    }
}
