package com.zksy.visualization.domain.response;

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

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 * @version 1.0
 * @project dh-server-micro
 * @description 智能面板分页查询
 * @date 2024/12/19 09:01:36
 */
@Data
public class IntelligentPanelResponse {

    @ApiModelProperty(value = "当前页码")
    private Integer currentPage;

    @ApiModelProperty(value = "每页条数")
    private Integer pageSize;

    @ApiModelProperty(value = "总页数")
    private Integer totalPage;

    @ApiModelProperty(value = "总条数")
    private Integer totalRows;

    @ApiModelProperty(value = "当前页数据")
    private List<PageDataItem> pageData;

@Data
class PageDataItem {

    @ApiModelProperty(value = "所属组织编码")
    private String orgCode;

    @ApiModelProperty(value = "所属组织名称")
    private String orgName;

    @ApiModelProperty(value = "设备编码")
    private String deviceCode;

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

    @ApiModelProperty(value = "设备在离线状态（0:离线 1:在线）")
    private Integer isOnline;

    @ApiModelProperty(value = "联动感应器名称")
    private List<String> linkageInductors;

    @ApiModelProperty(value = "设备类型")
    private String typeId;

    @ApiModelProperty(value = "面板拥有的按键集合")
    private Map<String, SwitchStatus> switchStatusMap;
}

    @Data
    class SwitchStatus {

        @ApiModelProperty(value = "按键的名称")
        private String switchName;

        @ApiModelProperty(value = "按键的开关状态 (0:关 1:开)")
        private Integer switchStatus;
    }
}
