package com.xy.event;

import com.xy.utils.EventUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 设备事件
 */
public class DeviceEvent {

    /**
     * 网络状态事件
     */
    @Data
    @Accessors(chain = true)
    public static class NetWorkEvent extends EventUtils.SpringEvent<Long> {

        @ApiModelProperty(value = "网络状态")
        private Integer netState;

    }

    /**
     * 运营状态事件
     */
    @Data
    @Accessors(chain = true)
    public static class BusyStateEvent extends EventUtils.SpringEvent<Long> {

        @ApiModelProperty(value = "运营状态")
        private Integer busyState;

    }

    /**
     * 设备温度变化事件
     */
    @Data
    @Accessors(chain = true)
    public static class TempEvent extends EventUtils.SpringEvent<Long> {

        @ApiModelProperty(value = "温度值")
        private Integer tempValue;

    }

    /**
     * 故障事件
     */
    @Data
    @Accessors(chain = true)
    public static class FaultEvent extends EventUtils.SpringEvent<Long> {

        @ApiModelProperty(value = "故障id")
        private Long faultId;

        @ApiModelProperty(value = "故障描述")
        private String describes;

        @ApiModelProperty(value = "发生次数")
        private Integer eventNum;

        @ApiModelProperty(value = "编码")
        private String eventCode;

        @ApiModelProperty(value = "是否已解决")
        private Boolean state;
    }
}
