package com.fizz.business.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 设备历史趋势数据 DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "设备历史趋势数据")
public class DeviceHistoryTrendDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "设备代码")
    private String deviceCode;

    @Schema(description = "设备描述")
    private String deviceName;

    @Schema(description = "时间轴（格式：HH:mm）")
    private List<String> categories;

    @Schema(description = "数据系列，key为字段名，value为数据值列表")
    private List<SeriesData> series;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "数据系列")
    public static class SeriesData implements Serializable {
        private static final long serialVersionUID = 1L;

        @Schema(description = "系列名称（字段标签）")
        private String name;

        @Schema(description = "字段名")
        private String fieldName;

        @Schema(description = "数据值列表")
        private List<Double> data;
    }
}

