package org.springblade.modules.api.request;

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

import javax.validation.constraints.NotBlank;

/**
 * 设备心跳数据
 */
@Data
public class VendingHeartReq {

    //心跳：正常{"machineId":"1814145843008155650","status":"OK","errorNum":"0","errorArray":"","location":"N,ddmm.mmmm,E,dddmm.mmmm"}
    //心跳：故障{"machineId":"1814145843008155650","status":"FAIL","errorNum":"2","errorArray":"1001,2001","location":"N,ddmm.mmmm,E,dddmm.mmmm"}

    @ApiModelProperty(value = "设备id")
    @NotBlank(message = "设备id不能为空")
    private String machineId;

    @ApiModelProperty(value = "设备状态")
    @NotBlank(message = "设备状态不能为空")
    private String status;

    @ApiModelProperty(value = "错误码数量")
    @NotBlank(message = "错误码数量不能为空")
    private String errorNum;

    @ApiModelProperty(value = "错误代码")
    private String errorArray;

    @ApiModelProperty(value = "设备地址")
    @NotBlank(message = "设备地址不能为空")
    private String location;

}
