chart_series_edb_mapping.go 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package models
  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. 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. o := orm.NewOrmUsingDB("data")
  22. sql := "SELECT * FROM chart_series_edb_mapping WHERE chart_info_id = ?"
  23. _, err = o.Raw(sql, chartInfoId).QueryRows(&items)
  24. return
  25. }