package cn.iocoder.yudao.module.product.controller.admin.deviceinfo.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
* 设备信息 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class DeviceInfoBaseVO {

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "地块/鱼塘/牧场编码")
    private String landId;

    @ApiModelProperty(value = "网关类型： 1：必联  2：有人")
    private Integer gatewayType;

    @ApiModelProperty(value = "设备类型： 1：控制器  2：传感器  3：监控", required = true)
    @NotNull(message = "设备类型： 1：控制器  2：传感器  3：监控不能为空")
    private Integer deviceType;

    @ApiModelProperty(value = "传感器对应的环境类型，关联product_env_type表的ID")
    private Long envType;

    @ApiModelProperty(value = "控制器字段")
    private String controllerField;

    @ApiModelProperty(value = "监控器编码, 内部请求用")
    private String monitorCode;

    @ApiModelProperty(value = "监控点名称")
    private String monitorPoints;

    @ApiModelProperty(value = "是否启用", required = true)
    @NotNull(message = "是否启用不能为空")
    private Boolean enabled;

    @ApiModelProperty(value = "开关是否开启", required = true)
    @NotNull(message = "开关是否开启不能为空")
    private Boolean switchOn;

    @ApiModelProperty(value = "关闭指令（在网关类型为有人时读取该字段）")
    private String closeInstruction;

    @ApiModelProperty(value = "开启指令（在网关类型为有人时读取该字段）")
    private String openInstruction;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "所属商户id", required = true)
    @NotNull(message = "所属商户id不能为空")
    private Long belongBusinessId;

    @ApiModelProperty(value = "所属商户名称", required = true)
    @NotNull(message = "所属商户名称不能为空")
    private String belongBusinessName;
}
