chart_series_edb_mapping.go 1.1 KB

123456789101112131415161718192021222324252627282930
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type ChartSeriesEdbMapping struct {
  7. ChartSeriesEdbMappingId int `orm:"column(chart_series_edb_mapping_id);pk"`
  8. ChartSeriesId int `description:"系列ID"`
  9. ChartInfoId int `description:"图表ID"`
  10. EdbInfoId int `description:"指标id"`
  11. EdbAliasName string `description:"中文别名"`
  12. EdbAliasNameEn string `description:"英文别名"`
  13. DateConfName string `description:"引用日期配置名称"`
  14. DateConf string `description:"日期配置名称"`
  15. ModifyTime time.Time `description:"修改时间"`
  16. CreateTime time.Time `description:"创建时间"`
  17. }
  18. func (c *ChartSeriesEdbMapping) TableName() string {
  19. return "chart_series_edb_mapping"
  20. }
  21. func GetChartSeriesEdbByChartInfoId(chartInfoId int) (items []*ChartSeriesEdbMapping, err error) {
  22. o := orm.NewOrmUsingDB("data")
  23. sql := "SELECT * FROM chart_series_edb_mapping WHERE chart_info_id = ?"
  24. _, err = o.Raw(sql, chartInfoId).QueryRows(&items)
  25. return
  26. }