package com.goldenchart.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * 지표 계산 결과 응답.
 * frontend PlotData 구조와 1:1 매핑.
 */
@Data @Builder @NoArgsConstructor @AllArgsConstructor
public class IndicatorResponse {
    private String symbol;
    private String timeframe;
    private String indicatorType;
    /** time 배열 (Unix 초) */
    private List<Long> times;
    /**
     * plot ID → [{time, value, color?}] 배열.
     * e.g. MACD: {"histogram":[...], "macd":[...], "signal":[...]}
     */
    private Map<String, List<PlotPoint>> values;

    @Data @Builder @NoArgsConstructor @AllArgsConstructor
    public static class PlotPoint {
        private long time;
        private Double value;
        private String color;
    }
}
