chart_series_edb_mapping.go 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package data_manage
  2. import (
  3. "eta_gn/eta_api/global"
  4. "time"
  5. )
  6. type ChartSeriesEdbMapping struct {
  7. ChartSeriesEdbMappingId int `orm:"column(chart_series_edb_mapping_id);pk" gorm:"primaryKey" `
  8. ChartSeriesId int `description:"系列ID"`
  9. ChartInfoId int `description:"图表ID"`
  10. EdbInfoId int `description:"指标id"`
  11. DateConfName string `description:"引用日期配置名称"`
  12. DateConfType int `description:"日期类型,0指标最新日期, 1引用日期"`
  13. DateConf string `description:"日期配置名称"`
  14. ModifyTime time.Time `description:"修改时间"`
  15. CreateTime time.Time `description:"创建时间"`
  16. }
  17. func (c *ChartSeriesEdbMapping) TableName() string {
  18. return "chart_series_edb_mapping"
  19. }
  20. func GetChartSeriesEdbByChartInfoId(chartInfoId int) (items []*ChartSeriesEdbMapping, err error) {
  21. sql := "SELECT * FROM chart_series_edb_mapping WHERE chart_info_id = ?"
  22. err = global.DmSQL["data"].Raw(sql, chartInfoId).Find(&items).Error
  23. return
  24. }