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;

/**
 * 单设备-单字段的趋势与统计
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "设备字段趋势数据")
public class DeviceFieldTrendDTO implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "设备名称")
    private String deviceName;

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

    @Schema(description = "字段中文名(可选)")
    private String fieldLabel;

    @Schema(description = "单位(可选)")
    private String unit;

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

    @Schema(description = "数据点")
    private List<Double> data;

    @Schema(description = "统计-平均值")
    private Double avg;

    @Schema(description = "统计-最大值")
    private Double max;

    @Schema(description = "统计-最小值")
    private Double min;

    @Schema(description = "统计-最新值")
    private Double last;
}
