package com.yuchen.saas.device.api.vo.scene;

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

import java.io.Serializable;

@Data
public class DeviceSceneLinkageRuleDetailTriggerVo implements Serializable {
   @ApiModelProperty(name = "uri", value = "规则类型（触发方式 property-属性触发，eve" +
           "nt-事件触发，deviceStatusChange-上下线触发, manual: 手动触发, cron：定时触发）")
   private String uri;
   @ApiModelProperty(name = "params", value = "规则参数")
   private Params params;
   public String getCheckType(){
        return uri.substring(uri.lastIndexOf("/")+1,uri.length());
    }
   @Data
   public static class Params{
       @ApiModelProperty(name = "productKey", value = "产品")
       private String productKey;
       @ApiModelProperty(name = "deviceName", value = "设备")
       private String deviceName;
       @ApiModelProperty(name = "eventCode", value = "事件")
       private String eventCode;
       @ApiModelProperty(name = "propertyName", value = "参数")
       private String propertyName;
       @ApiModelProperty(name = "compareType", value = "对比类型")
       private String compareType;
       @ApiModelProperty(name = "compareValue", value = "对比值")
       private String compareValue;
       @ApiModelProperty(name = "propMode", value = "参数值类型int float...")
       private String propMode;
       @ApiModelProperty(name = "status", value = "上下线状态 0 上下线，1 上线，2 下线")
       private Integer status;
   }

}
