package com.zksy.visualization.domain.response;

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

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @project dh-server-micro
 * @description 设备详情查询
 * @date 2024/12/23 14:24:23
 */
@Data
public class DeviceDetailsResponse {
    @ApiModelProperty(value = "设备名称", example = "Device123", required = true)
    private String deviceName;

    @ApiModelProperty(value = "设备编码", example = "code123", required = true)
    private String deviceCode;

    @ApiModelProperty(value = "设备唯一标识码", example = "SN123456789", required = true)
    private String deviceSn;

    @ApiModelProperty(value = "设备大类", example = "1", required = true)
    private Integer deviceCategory;

    @ApiModelProperty(value = "设备小类", example = "2", required = true)
    private Integer deviceType;

    @ApiModelProperty(value = "厂商类型", example = "ManufacturerA", required = true)
    private String deviceManufacturer;

    @ApiModelProperty(value = "设备型号", example = "ModelX", required = true)
    private String deviceModel;

    @ApiModelProperty(value = "设备IP", example = "192.168.1.1", required = true)
    private String deviceIp;

    @ApiModelProperty(value = "设备端口，取值范围：0 ~ 65535", example = "8080", required = true)
    private Integer devicePort;

    @ApiModelProperty(value = "设备所属组织", example = "Org123", required = true)
    private String ownerCode;

    @ApiModelProperty(value = "添加方式", example = "manual", required = true)
    private String loginType;

    @ApiModelProperty(value = "登录名称", example = "admin", required = true)
    private String loginName;

    @ApiModelProperty(value = "登录密码", example = "password123", required = true)
    private String loginPassword;

    @ApiModelProperty(value = "主动注册服务器编码", example = "Server123")
    private String registServerCode;

    @ApiModelProperty(value = "主动注册代理端口", example = "8081")
    private Integer registProxyPort;

    @ApiModelProperty(value = "主动注册设备编码", example = "RegDev123")
    private String registDeviceCode;

    @ApiModelProperty(value = "设备描述", example = "This is a device description.")
    private String memo;

    @ApiModelProperty(value = "在线状态", example = "1", required = true)
    private Integer isOnline;

    @ApiModelProperty(value = "是否休眠, 1-休眠，0-非休眠", example = "0", required = true)
    private Integer sleepStat;

    @ApiModelProperty(value = "第三服务代理端口", example = "8082")
    private Integer thirdProxyPort;

    @ApiModelProperty(value = "第三服务器编码", example = "ThirdServer123")
    private String thirdProxyServerCode;

    @ApiModelProperty(value = "加密狗是否到期, 0-否，1-是", example = "0", required = true)
    private Integer licenseLimit;

    @ApiModelProperty(value = "光栅图", example = "123456789")
    private Long mapId;

    @ApiModelProperty(value = "经度", example = "120.123456")
    private String gpsX;

    @ApiModelProperty(value = "纬度", example = "30.123456")
    private String gpsY;

    @ApiModelProperty(value = "设备所属子系统", example = "SubSystem1")
    private String subSystem;

    @ApiModelProperty(value = "设备扩展属性，自定义json数据")
    private Object devExt;

    @ApiModelProperty(value = "创建时间(13位时间戳)", example = "1672531200000", required = true)
    private Long createTime;

    @ApiModelProperty(value = "设备在线状态更新时间(yyyy-MM-dd HH:mm:ss)")
    private String onlineUpdateTime;

    @ApiModelProperty(value = "单元信息")
    private List<UnitInfo> units;
    @Data
    @ApiModel(description = "单元信息")
    public class UnitInfo {

        @ApiModelProperty(value = "单元类型", example = "1", required = true)
        private Integer unitType;

        @ApiModelProperty(value = "单元序号", example = "1", required = true)
        private Integer unitSeq;

        @ApiModelProperty(value = "排序码", example = "1", required = true)
        private Integer sort;

        @ApiModelProperty(value = "单元描述", example = "This is a unit description.")
        private String memo;

        @ApiModelProperty(value = "能力集", example = "CapabilitySet1")
        private String capability;

        @ApiModelProperty(value = "单元扩展信息")
        private Object unitExt;

        @ApiModelProperty(value = "单元通道信息")
        private List<ChannelInfo> channels;
    }

    @Data
    @ApiModel(description = "通道信息")
    public class ChannelInfo {

        @ApiModelProperty(value = "通道编码", example = "chCode123", required = true)
        private String channelCode;

        @ApiModelProperty(value = "通道名称", example = "ChannelName1", required = true)
        private String channelName;

        @ApiModelProperty(value = "通道序号", example = "1", required = true)
        private Integer channelSeq;

        @ApiModelProperty(value = "通道唯一标识码", example = "CHSN123456789", required = true)
        private String channelSn;

        @ApiModelProperty(value = "通道类型", example = "Video", required = true)
        private String channelType;

        @ApiModelProperty(value = "是否休眠, 1-休眠，0-非休眠", example = "0", required = true)
        private Integer sleepStat;

        @ApiModelProperty(value = "通道能力集")
        private String capability;

        @ApiModelProperty(value = "摄像头类型", example = "CameraTypeA")
        private String cameraType;

        @ApiModelProperty(value = "是否已接入, 0-未接入，1-接入", example = "1", required = true)
        private Integer access;

        @ApiModelProperty(value = "经度", example = "120.123456")
        private String gpsX;

        @ApiModelProperty(value = "纬度", example = "30.123456")
        private String gpsY;

        @ApiModelProperty(value = "Z轴", example = "10.123456")
        private String gpsZ;

        @ApiModelProperty(value = "通道描述", example = "This is a channel description.")
        private String memo;

        @ApiModelProperty(value = "状态, 0-不启用，1-启用", example = "1", required = true)
        private Integer stat;

        @ApiModelProperty(value = "通道扩展属性")
        private Object chExt;
    }
}
