123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- package edb_info
- import "time"
- // EdbInfo 指标信息表
- type EdbInfo struct {
- 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:钢联
- SubSource int `gorm:"column:sub_source;type:tinyint(4)" json:"subSource"` // 子来源,0:经济数据库,1:日期序列
- SubSourceName string `gorm:"column:sub_source_name;type:varchar(100)" json:"subSourceName"` // 子数据来源名称
- EdbCode string `gorm:"uniqueIndex:idx_code_source;unique;column:edb_code;type:varchar(255);default:''" json:"edbCode"` // 指标编码
- EdbName string `gorm:"uniqueIndex:idx_edb_name;column:edb_name;type:varchar(255);default:''" json:"edbName"` // 指标名称
- EdbNameSource string `gorm:"column:edb_name_source;type:varchar(255);default:''" json:"edbNameSource"` // 指标名称_来源
- Frequency string `gorm:"column:frequency;type:varchar(20);default:''" json:"frequency"` // 频度
- Unit string `gorm:"column:unit;type:varchar(20);default:''" json:"unit"` // 单位
- StartDate time.Time `gorm:"column:start_date;type:date" json:"startDate"` // 更新开始日期
- EndDate time.Time `gorm:"column:end_date;type:date" json:"endDate"` // 更新结束日期
- ClassifyId int `gorm:"index:idx_classify_id;column:classify_id;type:int(11)" json:"classifyId"` // 分类id
- SysUserId int `gorm:"column:sys_user_id;type:int(11)" json:"sysUserId"` // 创建人
- SysUserRealName string `gorm:"column:sys_user_real_name;type:varchar(100)" json:"sysUserRealName"` // 创建人姓名
- CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"` // 创建时间
- ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"` // 修改时间
- UniqueCode string `gorm:"unique;column:unique_code;type:varchar(50);default:''" json:"uniqueCode"` // 唯一编码
- MinValue float64 `gorm:"column:min_value;type:double;default:0" json:"minValue"` // 最小值
- MaxValue float64 `gorm:"column:max_value;type:double;default:0" json:"maxValue"` // 最大值
- CalculateFormula string `gorm:"column:calculate_formula;type:varchar(255);default:''" json:"calculateFormula"` // 计算公式,N数值移动
- EdbType int `gorm:"column:edb_type;type:tinyint(4);default:1" json:"edbType"` // 指标类型:1:基础指标,2:计算指标
- IsUpdate int `gorm:"column:is_update;type:tinyint(4);default:1" json:"isUpdate"` // 当天是否已更新,1:未更新,2:已更新
- Sort int `gorm:"column:sort;type:int(9);default:0" json:"sort"` // 排序字段
- LatestDate time.Time `gorm:"column:latest_date;type:date" json:"latestDate"` // 数据最新日期
- 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"` // 图表图片
- DataDateType string `gorm:"column:data_date_type;type:varchar(255);default:'交易日'" json:"dataDateType"` // 数据日期类型,枚举值:交易日、自然日
- }
- // TableName get sql table name.获取数据库表名
- func (m *EdbInfo) TableName() string {
- return "edb_info"
- }
- // EdbInfoColumns get sql column name.获取数据库列名
- var EdbInfoColumns = struct {
- EdbInfoID string
- EdbInfoType string
- SourceName string
- Source string
- EdbCode string
- EdbName string
- EdbNameSource string
- Frequency string
- Unit string
- StartDate string
- EndDate string
- ClassifyID string
- SysUserID string
- SysUserRealName string
- CreateTime string
- ModifyTime string
- UniqueCode string
- MinValue string
- MaxValue string
- CalculateFormula string
- EdbType string
- IsUpdate string
- Sort string
- LatestDate string
- LatestValue string
- MoveType string
- MoveFrequency string
- NoUpdate string
- ServerURL string
- EdbNameEn string
- UnitEn string
- ChartImage string
- DataDateType string
- }{
- EdbInfoID: "edb_info_id",
- EdbInfoType: "edb_info_type",
- SourceName: "source_name",
- Source: "source",
- EdbCode: "edb_code",
- EdbName: "edb_name",
- EdbNameSource: "edb_name_source",
- Frequency: "frequency",
- Unit: "unit",
- StartDate: "start_date",
- EndDate: "end_date",
- ClassifyID: "classify_id",
- SysUserID: "sys_user_id",
- SysUserRealName: "sys_user_real_name",
- CreateTime: "create_time",
- ModifyTime: "modify_time",
- UniqueCode: "unique_code",
- MinValue: "min_value",
- MaxValue: "max_value",
- CalculateFormula: "calculate_formula",
- EdbType: "edb_type",
- IsUpdate: "is_update",
- Sort: "sort",
- LatestDate: "latest_date",
- 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",
- DataDateType: "data_date_type",
- }
|