123456789101112131415161718192021 |
- package data_manage
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- // EdbBusinessSource
- // @Description: 自有数据(商家)指标来源
- type EdbBusinessSource struct {
- EdbBusinessSourceId int64 `orm:"column(edb_business_source_id);pk"`
- SourceName string `description:"来源名称"` // 来源名称
- CreateTime time.Time `description:"创建时间"` // 创建时间
- }
- func (s *EdbBusinessSource) GetAllList() (items []*EdbBusinessSource, err error) {
- o := orm.NewOrmUsingDB("data")
- sql := `SELECT * FROM edb_business_source order by edb_business_source_id desc `
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|