package com.usky.sas.service.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 地图详细信息（含背景图完整 URL、设备点位及设备信息、点位图标 URL）
 */
@Data
public class MapInfoVo {

    private String id;
    private String name;
    private Integer type;
    private String remark;
    private String parentId;
    private Double width;
    private Double height;
    private Boolean isMask;
    private String backImgId;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    /** 背景图完整访问 URL（protocol + host + port + pic.url/path） */
    private String backImgUrl;

    /** 地图下绑定的设备点位列表 */
    private List<MapDeviceInfoVo> deviceList;

    @Data
    public static class MapDeviceInfoVo {
        private String id;
        private String deviceId;
        private String mapId;
        private String imgId;
        private String type;
        private BigDecimal x;
        private BigDecimal y;
        private Double width;
        private Double height;
        private Double angle;
        private String text;
        private LocalDateTime createTime;
        private LocalDateTime updateTime;

        /** 点位图标完整访问 URL */
        private String imgUrl;

        /** 绑定的设备详情（含设备类型名称） */
        private DeviceInfoVo deviceInfo;
    }

    @Data
    public static class DeviceInfoVo {
        private String id;
        private String deviceId;
        private Integer channel;
        /** 设备类型名称（如：视频安防监控） */
        private String deviceType;
        private String ipAddr;
        private Integer port;
        private String address;
        private String note;
    }
}
