package response

import (
	"eta/eta_mobile/models/data_manage"
	"github.com/rdlucklib/rdluck_tools/paging"
)

// AddEdbInfoResp 添加指标返回
type AddEdbInfoResp struct {
	EdbInfoId  int    `description:"指标ID"`
	UniqueCode string `description:"指标唯一编码"`
}

// PredictEdbInfoListResp 预测指标列表返回数据
type PredictEdbInfoListResp struct {
	Paging *paging.PagingItem
	List   []*data_manage.EdbInfoList
}

// PredictEdbInfoDataResp 预测指标数据返回
type PredictEdbInfoDataResp struct {
	EdbInfo      *EdbInfoFull
	Button       data_manage.EdbClassifyItemsButton
	DataList     interface{}
	ClassifyList []*data_manage.EdbClassifyIdItems `description:"父级分类列表"`
}

type EdbInfoFull struct {
	*data_manage.EdbInfo
	HaveOperaAuth bool `description:"是否有数据权限，默认：false"`
}

// PredictEdbInfo 预测指标详情
type PredictEdbInfo struct {
	*EdbInfoFull
	RuleType       int                                   `description:"预测规则，1：最新，2：固定值，3：同比，4：同差，5：环比，6：环差，7：N期移动均值，8：N期段线性外推值"`
	FixedValue     float64                               `description:"固定值"`
	CalculateList  []*data_manage.EdbInfoCalculateDetail `description:"关联指标"`
	RuleList       []data_manage.PredictEdbConfDetail    `description:"指标规则配置"`
	CorrelationStr string                                `description:"相关性系数字符串"`
	ClassifyList   []*data_manage.EdbClassifyIdItems     `description:"父级分类列表"`
}

// PredictEdbInfoChartDataResp 获取预测指标绘图数据返回
type PredictEdbInfoChartDataResp struct {
	MinValue float64
	MaxValue float64
	DataList interface{}
}

// PredictRuleCalculateByNineResp 获取预测指标规则9的绘图数据返回
type PredictRuleCalculateByNineResp struct {
	LatestDate string
	DataList   []*data_manage.EdbDataList
}
