package com.zksy.visualization.domain.response;

import com.dahuatech.icc.oauth.http.IccResponse;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;

@Data
public class AirConditionerResponse  {
        @ApiModelProperty(value = "空调信息列表")
        private List<PageData> pageData;

        @ApiModelProperty(value = "当前页码", example = "1")
        private int currentPage;

        @ApiModelProperty(value = "总页数", example = "1")
        private int totalPage;

        @ApiModelProperty(value = "每页数量", example = "20")
        private int pageSize;

        @ApiModelProperty(value = "总记录数", example = "15")
        private int totalRows;

        @ApiModelProperty(value = "总数", example = "0")
        private int countAll;

        @ApiModelProperty(value = "失败数", example = "0")
        private int countFail;

    @Data
    public static class PageData {
        @ApiModelProperty(value = "离线空调数量", example = "0")
        private int offlineCount;

        @ApiModelProperty(value = "运行空调数量", example = "11")
        private int runningCount;

        @ApiModelProperty(value = "大于设定温度的空调数量", example = "0")
        private int overTemperatureCount;

        @ApiModelProperty(value = "大于等于设定使用时长的空调数量", example = "0")
        private int overUseTimeCount;

        @ApiModelProperty(value = "空调信息列表")
        private List<AirConditionerVo> airConditionerVoList;
    }

    @Data
    public static class AirConditionerVo {
        @ApiModelProperty(value = "设备编码")
        private String deviceCode;

        @ApiModelProperty(value = "通道编码")
        private String channelCode;

        @ApiModelProperty(value = "通道名称")
        private String channelName;

        @ApiModelProperty(value = "温度", example = "25")
        private int temperature;

        @ApiModelProperty(value = "模式：0-自动，1-制冷，2-制热，3-通风，4-除湿", example = "4")
        private int model;

        @ApiModelProperty(value = "风速：0-自动，1-低速，2-中速，3-高速", example = "1")
        private int windSpeed;

        @ApiModelProperty(value = "使用时长，单位：秒", example = "0")
        private int useTime;

        @ApiModelProperty(value = "运行状态 1-开启，0-关闭", example = "0")
        private int powerStatus;

        @ApiModelProperty(value = "逻辑组织名称")
        private String allLogicName;

        @ApiModelProperty(value = "室内温度", example = "29")
        private int indoorTemp;

        @ApiModelProperty(value = "在离线状态 1-在线 0-离线", example = "1")
        private int status;

        @ApiModelProperty(value = "任务列表")
        private List<AirConditionerTaskVo> airConditionerTaskVoList;
    }

    @Data
    public static class AirConditionerTaskVo {
        @ApiModelProperty(value = "定时任务名称")
        private String timeTaskName;

        @ApiModelProperty(value = "定时任务时间，格式：yyyy-MM-dd HH:mm")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
        private Date timeTaskTime;

        @ApiModelProperty(value = "定时任务将要执行的操作，1-开启，0-关闭", example = "0")
        private int timeTaskStatus;
    }
}