package models

import "time"

// FenweiExcelIndex 汾渭Excel指标数据
type FenweiExcelIndex struct {
	//ClassifyName string `description:"指标目录"`
	//ClassifySort int    `description:"指标目录排序号"`
	IndexName    string `description:"指标名称"`
	IndexCode    string `description:"指标编码"`
	Unit         string `description:"单位"`
	Sort         int    `description:"排序号"`
	Frequency    string `description:"频度"`
	TerminalCode string `description:"编码"`
	ClassifyId   int    `description:"分类ID"`
	ExcelDataMap map[string]string
}

// BaseFromFenweiClassifyItem 汾渭数据分类信息
type BaseFromFenweiClassifyItem struct {
	ClassifyId   int                           `description:"分类ID"`
	ClassifyName string                        `description:"分类名称"`
	ParentId     int                           `description:"父级id"`
	Level        int                           `description:"层级"`
	Sort         int                           `description:"排序字段"`
	CreateTime   string                        `description:"创建时间"`
	ModifyTime   string                        `description:"修改时间"`
	Child        []*BaseFromFenweiClassifyItem `description:"子分类"`
}

type EdbLibFenweiClassifyResponse struct {
	Ret     int
	Msg     string
	ErrMsg  string
	ErrCode string
	Data    []BaseFromFenweiClassifyItem
}

type BaseFromFenweiIndex struct {
	FenweiIndexId int64 `orm:"column(fenwei_index_id);pk"`
	IndexCode     string
	IndexName     string
	Frequency     string
	Unit          string
	ClassifyId    int
	StartDate     string
	EndDate       string
	Sort          int
	TerminalCode  string
	CreateTime    time.Time
	ModifyTime    time.Time
}

type EdbLibFenweiIndexListResponse struct {
	Ret     int
	Msg     string
	ErrMsg  string
	ErrCode string
	Data    []BaseFromFenweiIndex
}

// RequestParams 接口爬取汾渭网页数据
type RequestParams struct {
	Category     interface{}         `json:"category"`
	CheckedDims  map[string][]string `json:"checkedDims"`
	DateRange    string              `json:"dateRange"`
	ProductCode  string              `json:"productCode"`
	QuotaName    string              `json:"quotaName"`
	SplitTypeKey string              `json:"splitTypeKey"`
	IsTotal      interface{}         `json:"isTotal"`
	DataType     interface{}         `json:"dataType"`
	Type         int                 `json:"type"`
	IsSeason     int                 `json:"isSeason"`
	splitTypeKey string              `json:"splitTypeKey"`
}

type Response struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type JsonConfig struct {
	Data []string `json:"data"`
}

type FenWeiNetResponse struct {
	MonthlyAccumulation        string      `json:"monthly_accumulation"`
	ProductItemCode            string      `json:"product_item_code"`
	MonthlyValueChnName        string      `json:"monthly_value_chn_name"`
	MonthlyAccumulationChnName string      `json:"monthly_accumulation_chn_name"`
	ProductItemName            string      `json:"product_item_name"`
	DataDate                   string      `json:"data_date"`
	MonthlyValue               string      `json:"monthly_value"`
	MonthlyValueChnUnit        string      `json:"monthly_value_chn_unit"`
	ProductCode                string      `json:"product_code"`
	ProvinceName               string      `json:"province_name"`
	MonthlyAccumulationChnUnit string      `json:"monthly_accumulation_chn_unit"`
	PortName                   string      `json:"port_name"`
	PortSonName                string      `json:"port_son_name"`
	Stock                      interface{} `json:"stock"`
	StockChnName               string      `json:"stock_chn_name"`
	StockChnUnit               string      `json:"stock_chn_unit"`
	CoalTypeName               string      `json:"coal_type_name"`
	WeekValueChnName           string      `json:"week_value_chn_name"`
	WeekValue                  string      `json:"week_value"`
	AvaliableDaysChnName       string      `json:"avaliable_days_chn_name"`
	AvaliableDaysChnUnit       string      `json:"avaliable_days_chn_unit"`
	AvaliableDays              string      `json:"avaliable_days"`
	DailyConsumptionChnName    string      `json:"daily_consumption_chn_name"`
	DailyConsumptionChnUnit    string      `json:"daily_consumption_chn_unit"`
	DailyConsumption           string      `json:"daily_consumption"`
	InventoryIndexChnUnit      string      `json:"inventory_index_chn_unit"`
	InventoryIndex             interface{} `json:"inventory_index"`
	TonsChnUnit                string      `json:"tons_chn_unit"`
	Tons                       string      `json:"tons"`
	TransportVolumeChnUnit     string      `json:"transport_volume_chn_unit"`
	TransportVolume            string      `json:"transport_volume"`
	PriceRmbChnName            string      `json:"price_rmb_chn_name"`
	PriceIndexMomChnName       string      `json:"price_index_mom_chn_name"`
	PriceRmbChnUnit            string      `json:"price_rmb_chn_unit"`
	PriceIndexMomChnUnit       string      `json:"price_index_mom_chn_unit"`
	PriceRmb                   interface{} `json:"price_rmb"`
	PriceIndexMom              interface{} `json:"price_index_mom"`
	VehicleChnUnit             string      `json:"vehicle_chn_unit"`
	ShipChnUnit                string      `json:"ship_chn_unit"`
	WeekValueChnUnit           string      `json:"week_value_chn_unit"`
}

type FenWeiNetResponseWrapper struct {
	Data struct {
		Data []FenWeiNetResponse `json:"data"`
	} `json:"data"`
}

type FenWeiNetResponseMapWrapper struct {
	Data struct {
		Data map[string][]FenWeiNetResponse `json:"data"`
	} `json:"data"`
}

type FenWeiNetResponseAStratumMapWrapper struct {
	Data map[string][]FenWeiNetResponse `json:"data"`
}

type FenWeiNetResponseResult struct {
	Product            string              `json:"product"`
	FenWeiNetResponses []FenWeiNetResponse `json:"fenWeiNetResponses"`
}

type FenWeiNetIndexInfo struct {
	IndexName string `description:"指标名称"`
	//IndexCode    string  `description:"指标编码"`
	Unit         string      `description:"单位"`
	Frequency    string      `description:"频度"`
	TerminalCode string      `description:"编码"`
	ClassifyName string      `description:"分类名称"`
	DataTime     string      `description:"数据时间"`
	Value        interface{} `description:"数据值"`
}