|
@@ -13,13 +13,16 @@ import (
|
|
|
|
|
|
type EdbInfo struct {
|
|
|
EdbInfoId int `orm:"column(edb_info_id);pk"`
|
|
|
+ EdbInfoType int `description:"指标类型,0:普通指标,1:预测指标"`
|
|
|
SourceName string `description:"来源名称"`
|
|
|
Source int `description:"来源id"`
|
|
|
EdbCode string `description:"指标编码"`
|
|
|
EdbName string `description:"指标名称"`
|
|
|
+ EdbNameEn string `description:"英文指标名称"`
|
|
|
EdbNameSource string `description:"指标名称来源"`
|
|
|
Frequency string `description:"频率"`
|
|
|
Unit string `description:"单位"`
|
|
|
+ UnitEn string `description:"英文单位"`
|
|
|
StartDate string `description:"起始日期"`
|
|
|
EndDate string `description:"终止日期"`
|
|
|
ClassifyId int `description:"分类id"`
|
|
@@ -32,20 +35,23 @@ type EdbInfo struct {
|
|
|
MaxValue float64 `description:"指标最大值"`
|
|
|
CalculateFormula string `description:"计算公式"`
|
|
|
EdbType int `description:"指标类型:1:基础指标,2:计算指标"`
|
|
|
+ IsUpdate int `description:"当天是否已更新,1:未更新,2:已更新"`
|
|
|
Sort int `description:"排序字段"`
|
|
|
+ LatestDate string `description:"数据最新日期"`
|
|
|
+ LatestValue float64 `description:"数据最新值"`
|
|
|
MoveType int `description:"移动方式:1:领先(默认),2:滞后"`
|
|
|
MoveFrequency string `description:"移动频度"`
|
|
|
NoUpdate int8 `description:"是否停止更新,0:继续更新;1:停止更新"`
|
|
|
ServerUrl string `description:"服务器地址"`
|
|
|
+ ChartImage string `description:"图表图片"`
|
|
|
+ Calendar string `description:"公历/农历" orm:"default(公历);"`
|
|
|
+ DataDateType string `orm:"column(data_date_type);size(255);null;default(交易日)"`
|
|
|
+}
|
|
|
|
|
|
- EdbInfoType int `description:"指标类型,0:普通指标,1:预测指标"`
|
|
|
- EdbNameEn string `description:"英文指标名称"`
|
|
|
- UnitEn string `description:"英文单位"`
|
|
|
- LatestDate string `description:"数据最新日期"`
|
|
|
- LatestValue float64 `description:"数据最新值"`
|
|
|
- ChartImage string `description:"图表图片"`
|
|
|
- Calendar string `description:"公历/农历"`
|
|
|
- DataDateType string `orm:"column(data_date_type);size(255);null;default(交易日)"`
|
|
|
+func (e *EdbInfo) Add() (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ _, err = o.Insert(e)
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
// AddEdbInfo 添加指标
|
|
@@ -942,6 +948,7 @@ func GetEdbInfoItemByCondition(condition string, pars []interface{}) (item *EdbI
|
|
|
// EdbInfoDetailReq 指标详情请求
|
|
|
type EdbInfoDetailReq struct {
|
|
|
UniqueCode string `description:"指标唯一编码"`
|
|
|
+ EdbCode string `description:"指标编码"`
|
|
|
}
|
|
|
|
|
|
// EdbInfoDetailResp 指标详情返回
|