report_selection_chart_log.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxReportSelectionChartLog struct {
  7. ArticleSunId int `orm:"column(article_sun_id);pk"description:"子级报告id"`
  8. ArticleId int `description:"父级报告Id"`
  9. ChartPermissionId int `description:"行业ID"`
  10. CreateTime time.Time `description:"创建时间"`
  11. Body string `description:"内容"`
  12. }
  13. type CygxReportSelectionChartLogRep struct {
  14. ChartPermissionId int `description:"行业ID"`
  15. ChartPermissionName string `description:"行业ID"`
  16. BodyChartSummary string `orm:"column(body)"description:"内容"`
  17. }
  18. type AddCygxReportSelectionChartLog struct {
  19. ChartPermissionId int `description:"行业ID"`
  20. ChartPermissionName string `description:"行业ID"`
  21. BodyChartSummary string `orm:"column(body)"description:"内容"`
  22. }
  23. func GetCygxReportSelectionChartLogRepList(articleId int) (items []*CygxReportSelectionChartLogRep, err error) {
  24. o := orm.NewOrm()
  25. sql := `SELECT l.*
  26. FROM cygx_report_selection_chart_log AS l
  27. WHERE 1= 1 AND article_id=? `
  28. _, err = o.Raw(sql, articleId).QueryRows(&items)
  29. return
  30. }