123456789101112131415161718192021222324252627282930 |
- package models
- import (
- "eta_gn/eta_index_lib/global"
- "time"
- )
- // PredictEdbConfCalculateMapping 预测基础指标规则 与 计算预测指标关联关系表
- type PredictEdbConfCalculateMapping struct {
- PredictEdbConfCalculateMappingId int `gorm:"primaryKey;autoIncrement;column:predict_edb_conf_calculate_mapping_id"`
- EdbInfoId int `description:"指标id"`
- ConfigId int `description:"配置id"`
- FromEdbInfoId int `description:"基础指标id"`
- FromEdbCode string `description:"基础指标编码"`
- FromEdbName string `description:"基础指标名称"`
- FromSource int `description:"基础指标来源"`
- FromSourceName string `description:"基础指标来源名称"`
- FromTag string `description:"来源指标标签"`
- Sort int `description:"计算指标名称排序"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- }
- // GetPredictEdbConfCalculateMappingListByEdbInfoId 根据预测指标id获取所有关联指标
- func GetPredictEdbConfCalculateMappingListByEdbInfoId(edbInfoId int) (list []*PredictEdbConfCalculateMapping, err error) {
- sql := ` SELECT * from predict_edb_conf_calculate_mapping WHERE edb_info_id=? ORDER BY predict_edb_conf_calculate_mapping_id ASC `
- err = global.DEFAULT_DmSQL.Raw(sql, edbInfoId).Find(&list).Error
- return
- }
|