package report_chapter_ticker

import (
	"github.com/beego/beego/v2/client/orm"
	"time"
)

type ReportChapterTicker struct {
	Id              int       `orm:"column(id);pk" description:"id"`
	ReportChapterId int       ``
	Sort            int       ``
	Ticker          string    ``
	CreateTime      time.Time `` //创建时间
	UpdateTime      time.Time `` //修改时间
}

// GetTickerByChapterId
func GetTickerByChapterId(reportChapterId int) (list []*ReportChapterTicker, err error) {
	o := orm.NewOrmUsingDB("rddp")
	sql := `SELECT * FROM report_chapter_ticker WHERE  report_chapter_id = ?  `
	_, err = o.Raw(sql, reportChapterId).QueryRows(&list)
	return
}
