package chart_info

import (
	responseModel "hongze/hongze_yb/models/response"
	"hongze/hongze_yb/models/tables/chart_edb_mapping"
	"hongze/hongze_yb/models/tables/chart_info"
)

type ChartInfoDetailResp struct {
	ChartInfo            *chart_info.ChartInfoView
	EdbInfoList          []*chart_edb_mapping.ChartEdbInfoMappingList
	XEdbIdValue          []int   `description:"柱方图的x轴数据，指标id"`
	XDataList            []XData `description:"商品价格曲线的X轴数据"`
	YDataList            []YData `description:"柱方图的y轴数据"`
	MyChartInfo          *responseModel.MyChartItem
	CorrelationChartInfo *CorrelationInfo `description:"相关性图表信息"`
}

// XData 商品价格曲线的的x轴数据
type XData struct {
	Name   string `description:"别名"`
	NameEn string `description:"英文别名"`
}

// YData 柱方图的y轴数据
type YData struct {
	Date           string    `description:"数据日期"`
	Color          string    `description:"数据颜色"`
	Name           string    `description:"别名"`
	NameEn         string    `description:"英文别名"`
	Value          []float64 `description:"每个指标的值"`
	NoDataEdbList  []int     `description:"没有数据的指标列表"`
	XEdbInfoIdList []int     `description:"对应X轴的指标id列表"`
}

type CorrelationInfo struct {
	LeadValue       int    `description:"领先值"`
	LeadUnit        string `description:"领先单位"`
	StartDate       string `description:"开始日期"`
	EndDate         string `description:"结束日期"`
	EdbInfoIdFirst  int    `description:"A指标ID"`
	EdbInfoIdSecond int    `description:"B指标ID"`
	PeriodData      string `description:"X轴-期数数据"`
	CorrelationData string `description:"Y轴-相关性系数"`
}
