package com.zksy.visualization.domain.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;

@Data
@ApiModel(description = "设备分页查询响应")
public class DevicePageResponse {
    @ApiModelProperty(value = "当前页码", example = "1")
    private int currentPage;

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

    @ApiModelProperty(value = "每页记录数", example = "10")
    private int pageSize;

    @ApiModelProperty(value = "总数", example = "45")
    private int totalRows;

    @ApiModelProperty(value = "数据列表")
    private List<DeviceInfoVO> pageData;
    @Data
    private static class DeviceInfoVO {
        @ApiModelProperty(value = "设备编码")
        private String deviceCode;
        @ApiModelProperty(value = "设备名称")
        private String deviceName;
        @ApiModelProperty(value = "设备唯一标识码")
        private String deviceSn;
        @ApiModelProperty(value = "设备mac")
        private String deviceMac;
        @ApiModelProperty(value = "设备大类")
        private Integer deviceCategory;
        @ApiModelProperty(value = "设备小类")
        private String deviceType;
        @ApiModelProperty(value = "厂商类型")
        private String deviceManufacturer;
        @ApiModelProperty(value = "设备型号")
        private String deviceModel;
        @ApiModelProperty(value = "设备IP")
        private String deviceIp;
        @ApiModelProperty(value = "设备端口")
        private Integer devicePort;
        @ApiModelProperty(value = "设备所属组织编码")
        private String ownerCode;
        @ApiModelProperty(value = "添加方式")
        private String loginType;
        @ApiModelProperty(value = "登录名称")
        private String loginName;
        @ApiModelProperty(value = "登录密码")
        private String loginPassword;
        @ApiModelProperty(value = "是否修改密码")
        private Boolean isPwdChange;
        @ApiModelProperty(value = "设备在线状态")
        private Integer isOnline;
        @ApiModelProperty(value = "设备在线状态更新时间(yyyy-MM-dd HH:mm:ss)，设备由在线变为离线或者离线变为在线都会进行更新")
        private String onlineUpdateTime;
        @ApiModelProperty(value = "设备在线版本")
        private String onlineUpdateVersion;
        @ApiModelProperty(value = "设备离线原因")
        private String offlineReason;
        @ApiModelProperty(value = "是否是虚拟通道")
        private String isVirtual;
        @ApiModelProperty(value = "设备所属子系统")
        private String subSystem;
        @ApiModelProperty(value = "是否休眠1休眠，0非休眠")
        private Integer sleepStat;
        @ApiModelProperty(value = "第三服务代理端口")
        private Integer thirdProxyPort;
        @ApiModelProperty(value = "第三服务器编码")
        private String thirdProxyServerCode;
        @ApiModelProperty(value = "加密狗是否到期0否，1是")
        private Integer licenseLimit;
        @ApiModelProperty(value = "设备扩展属性，自定义json数据")
        private Object devExt;
        @ApiModelProperty(value = "经度")
        private String gpsX;
        @ApiModelProperty(value = "纬度")
        private String gpsY;
        @ApiModelProperty(value = "能力集")
        private String capability;
        @ApiModelProperty(value = "单元信息")
        private List<UnitVO> units;
        @ApiModelProperty(value = "修改时间")
        private Long updateTime;
        @ApiModelProperty(value = "创建时间")
        private Long createTime;
        private Long recordUpdateTime;
    }
    @Data
    private static class UnitVO {
        @ApiModelProperty(value = "单元类型")
        private Integer unitType;
        @ApiModelProperty(value = "单元序号")
        private Integer unitSeq;
        @ApiModelProperty(value = "排序码")
        private Integer sort;
        @ApiModelProperty(value = "能力集")
        private String capability;
        @ApiModelProperty(value = "单元扩展信息")
        private Object unitExt;
        @ApiModelProperty(value = "单元通道信息")
        private List<ChannelVO> channels;
    }
    @Data
    private static class ChannelVO {
        @ApiModelProperty(value = "通道编码")
        private String channelCode;
        @ApiModelProperty(value = "通道名称")
        private String channelName;
        @ApiModelProperty(value = "通道序号")
        private Integer channelSeq;
        @ApiModelProperty(value = "通道唯一标识码")
        private String channelSn;
        @ApiModelProperty(value = "设备所属组织编码")
        private String ownerCode;
        @ApiModelProperty(value = "通道类型")
        private String channelType;
        @ApiModelProperty(value = "通道能力集，详细说明请参考通道能力级说明")
        private String capability;
        @ApiModelProperty(value = "摄像头类型，视频通道会返回该字段")
        private String cameraType;
        @ApiModelProperty(value = "是否已接入：0-未接入，1-接入")
        private Integer access;
        @ApiModelProperty(value = "经度")
        private String gpsX;
        @ApiModelProperty(value = "纬度")
        private String gpsY;
        @ApiModelProperty(value = "设备在线状态")
        private Integer isOnline;
        @ApiModelProperty(value = "设备在线状态更新时间(yyyy-MM-dd HH:mm:ss)，设备由在线变为离线或者离线变为在线都会进行更新")
        private String onlineUpdateTime;
        @ApiModelProperty(value = "设备在线版本")
        private String onlineUpdateVersion;
        @ApiModelProperty(value = "是否休眠1休眠，0非休眠")
        private Integer sleepStat;
        @ApiModelProperty(value = "Z轴")
        private String gpsZ;
        @ApiModelProperty(value = "通道描述")
        private String memo;
        @ApiModelProperty(value = "状态 ：0-不启用，1-启用")
        private Integer stat;
        @ApiModelProperty(value = "通道扩展属性 自定义 ")
        private Object chExt;
        @ApiModelProperty(value = "是否是虚拟通道")
        private String isVirtual;
        @ApiModelProperty(value = "修改时间")
        private Long updateTime;
        @ApiModelProperty(value = "创建时间")
        private Long createTime;
        private Long treeSort;
        private String newTreeSort;
    }
}