cygx_research_summary.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxResearchSummaryLog struct {
  7. ArticleSunId int `orm:"column(article_sun_id);pk"description:"子级报告id"`
  8. ArticleId int `description:"父级报告Id"`
  9. Type string `description:"类型'SDBG:深度报告片篇,’CYDYJY:产业调研纪要’,’SJDP:事件点评,’BZCHJH:本周晨会精华’"`
  10. Sort string `description:"排序"`
  11. ChartPermissionId int `description:"行业ID"`
  12. ChartPermissionSort string `description:"行业排序"`
  13. CreateTime time.Time `description:"创建时间"`
  14. Body string `description:"内容"`
  15. ReportLink string `description:"报告链接"`
  16. LinkArticleId int `description:"报告ID链接"`
  17. }
  18. type CygxResearchSummary struct {
  19. ArticleId int `orm:"column(article_id);pk"description:"报告id"`
  20. Title string `description:"标题"`
  21. Department string `description:"作者"`
  22. Abstract string `description:"摘要"`
  23. PublishStatus int `description:"发布状态,1已发布,0未发布"`
  24. PublishDate time.Time `description:"发布时间"`
  25. CreateTime time.Time `description:"创建时间"`
  26. LastUpdatedTime time.Time `description:"最后一次更新时间"`
  27. Periods string `description:"期数"`
  28. HavePublish int `description:"是否发布过,1是,0否"`
  29. AdminId int `description:"销售/管理员ID"`
  30. AdminName string `description:"销售/管理员姓名"`
  31. }
  32. func AddCygxResearchSummaryOrm(item *CygxResearchSummary) (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 AddCygxResearchSummaryLogOrm(items []*CygxResearchSummaryLog) (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. }
  48. type CygxRSlChartPermission struct {
  49. ChartPermissionId int `description:"行业ID"`
  50. ChartPermissionSort string `description:"行业排序"`
  51. List []*AddCygxResearchSummaryLog
  52. }
  53. type AddCygxResearchSummaryLog struct {
  54. Body string `description:"内容"`
  55. ReportLink string `description:"报告链接"`
  56. ChartPermissionSort string `description:"行业排序"`
  57. }
  58. type CygxArticleSubjectList struct {
  59. ArticleId int `description:"报告id"`
  60. SubjectName string `description:"标的名称"`
  61. }