edb_business_source.go 663 B

123456789101112131415161718192021
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. // EdbBusinessSource
  7. // @Description: 自有数据(商家)指标来源
  8. type EdbBusinessSource struct {
  9. EdbBusinessSourceId int64 `orm:"column(edb_business_source_id);pk"`
  10. SourceName string `description:"来源名称"` // 来源名称
  11. CreateTime time.Time `description:"创建时间"` // 创建时间
  12. }
  13. func (s *EdbBusinessSource) GetAllList() (items []*EdbBusinessSource, err error) {
  14. o := orm.NewOrmUsingDB("data")
  15. sql := `SELECT * FROM edb_business_source order by edb_business_source_id desc `
  16. _, err = o.Raw(sql).QueryRows(&items)
  17. return
  18. }