|
@@ -4,7 +4,8 @@ import "time"
|
|
|
|
|
|
// EdbInfo 指标信息表
|
|
|
type EdbInfo struct {
|
|
|
- EdbInfoId int `gorm:"primaryKey;column:edb_info_id;type:int(11);not null" json:"edbInfoId"` // 指标id
|
|
|
+ EdbInfoId int `gorm:"primaryKey;column:edb_info_id;type:int(11);not null" json:"edbInfoId"` // 指标id
|
|
|
+ EdbInfoType uint8 `gorm:"column:edb_info_type;type:tinyint(9) unsigned;default:0" json:"edbInfoType"` // 指标类型,0:普通指标,1:预测指标
|
|
|
SourceName string `gorm:"column:source_name;type:varchar(100)" json:"sourceName"` // 来源名称
|
|
|
Source int `gorm:"uniqueIndex:idx_code_source;uniqueIndex:idx_edb_name;column:source;type:tinyint(4)" json:"source"` // 来源:1:同花顺,2:wind,3:彭博,4:指标运算,5:累计值转月,6:同比值,7:同差值,8:N数值移动平均计算,9:手工指标,10:隆众,11:有色,12:环比值,13:环差值,14:变频,15:钢联
|
|
|
EdbCode string `gorm:"uniqueIndex:idx_code_source;unique;column:edb_code;type:varchar(255);default:''" json:"edbCode"` // 指标编码
|
|
@@ -30,6 +31,11 @@ type EdbInfo struct {
|
|
|
LatestValue float64 `gorm:"column:latest_value;type:double" json:"latestValue"` // 数据最新值
|
|
|
MoveType int `gorm:"column:move_type;type:tinyint(4);default:1" json:"moveType"` // 移动方式:1:领先(默认),2:滞后
|
|
|
MoveFrequency string `gorm:"column:move_frequency;type:varchar(20);default:''" json:"moveFrequency"` // 移动频度
|
|
|
+ NoUpdate int8 `gorm:"column:no_update;type:tinyint(4);default:0" json:"noUpdate"` // 是否停止更新,0:继续更新;1:停止更新
|
|
|
+ ServerURL string `gorm:"column:server_url;type:varchar(255);default:''" json:"serverUrl"` // 服务器地址
|
|
|
+ EdbNameEn string `gorm:"column:edb_name_en;type:varchar(255);default:''" json:"edbNameEn"` // 英文指标名称
|
|
|
+ UnitEn string `gorm:"column:unit_en;type:varchar(20);default:''" json:"unitEn"` // 英文单位
|
|
|
+ ChartImage string `gorm:"column:chart_image;type:varchar(255);default:''" json:"chartImage"` // 图表图片
|
|
|
}
|
|
|
|
|
|
// TableName get sql table name.获取数据库表名
|
|
@@ -40,6 +46,7 @@ func (m *EdbInfo) TableName() string {
|
|
|
// EdbInfoColumns get sql column name.获取数据库列名
|
|
|
var EdbInfoColumns = struct {
|
|
|
EdbInfoID string
|
|
|
+ EdbInfoType string
|
|
|
SourceName string
|
|
|
Source string
|
|
|
EdbCode string
|
|
@@ -65,8 +72,14 @@ var EdbInfoColumns = struct {
|
|
|
LatestValue string
|
|
|
MoveType string
|
|
|
MoveFrequency string
|
|
|
+ NoUpdate string
|
|
|
+ ServerURL string
|
|
|
+ EdbNameEn string
|
|
|
+ UnitEn string
|
|
|
+ ChartImage string
|
|
|
}{
|
|
|
EdbInfoID: "edb_info_id",
|
|
|
+ EdbInfoType: "edb_info_type",
|
|
|
SourceName: "source_name",
|
|
|
Source: "source",
|
|
|
EdbCode: "edb_code",
|
|
@@ -92,4 +105,9 @@ var EdbInfoColumns = struct {
|
|
|
LatestValue: "latest_value",
|
|
|
MoveType: "move_type",
|
|
|
MoveFrequency: "move_frequency",
|
|
|
-}
|
|
|
+ NoUpdate: "no_update",
|
|
|
+ ServerURL: "server_url",
|
|
|
+ EdbNameEn: "edb_name_en",
|
|
|
+ UnitEn: "unit_en",
|
|
|
+ ChartImage: "chart_image",
|
|
|
+}
|