cygx_minutes_summary.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxMinutesSummary struct {
  7. ArticleId int `orm:"column(article_id);pk"description:"报告id"`
  8. Title string `description:"标题"`
  9. Department string `description:"作者"`
  10. Abstract string `description:"摘要"`
  11. PublishStatus int `description:"发布状态,1已发布,0未发布"`
  12. PublishDate time.Time `description:"发布时间"`
  13. CreateTime time.Time `description:"创建时间"`
  14. LastUpdatedTime time.Time `description:"最后一次更新时间"`
  15. Periods string `description:"期数"`
  16. HavePublish int `description:"是否发布过,1是,0否"`
  17. AdminId int `description:"销售/管理员ID"`
  18. AdminName string `description:"销售/管理员姓名"`
  19. }
  20. type CygxMinutesSummaryLog struct {
  21. ArticleSunId int `orm:"column(article_sun_id);pk"description:"子级报告id"`
  22. ArticleId int `description:"父级报告Id"`
  23. Type string `description:"类型'SSGS:上市公司调研纪要,’CYDYJY:产业调研纪要’,’YANX:研选"`
  24. Sort string `description:"排序"`
  25. ChartPermissionId int `description:"行业ID"`
  26. ChartPermissionSort string `description:"行业排序"`
  27. CreateTime time.Time `description:"创建时间"`
  28. Body string `description:"内容"`
  29. ReportLink string `description:"报告链接"`
  30. LinkArticleId int `description:"报告ID链接"`
  31. }
  32. func AddCygxMinutesSummaryOrm(item *CygxMinutesSummary) (newArtId int64, err error) {
  33. o := orm.NewOrmUsingDB("hz_cygx")
  34. newArtId, err = o.Insert(item)
  35. if err != nil {
  36. return
  37. }
  38. return
  39. }
  40. func AddCygxMinutesSummaryLogOrm(items []*CygxMinutesSummaryLog) (newArtId int64, err error) {
  41. o := orm.NewOrmUsingDB("hz_cygx")
  42. newArtId, err = o.InsertMulti(1, items)
  43. if err != nil {
  44. return
  45. }
  46. return
  47. }