annual_report.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type AnnualReport struct {
  7. AnnualReportId int `orm:"column(annual_report_id);pk"`
  8. AnnualReportDate string `description:"报告年度"`
  9. UserId int `description:"用户id"`
  10. Mobile string `description:"手机号"`
  11. Email string `description:"邮箱"`
  12. CompanyId int `description:"公司id"`
  13. RealName string `description:"用户实际名称"`
  14. TogetherDay string `description:"相伴天数"`
  15. CreateDate string `description:"创建时间"`
  16. FirstReadReportType string `description:"首次阅读报告类型"`
  17. FirstReadReportTitle string `description:"首次阅读报告标题"`
  18. ListenReportCount int `description:"收听报告次数"`
  19. ListenReportDuration float64 `description:"收听报告时长"`
  20. MaxReadReportDate string `description:"阅读报告最多的一天"`
  21. MaxReadReportCount int `description:"阅读报告最多的一天,报告数量"`
  22. LatestReadReportDate string `description:"阅读报告时间最晚的一天"`
  23. LatestReadReportTime string `description:"阅读报告时间最晚的一天,最晚的时间"`
  24. LatestReadReportDateDuration float64 `description:"阅读报告时间最晚的一天,总共阅读报告的时长"`
  25. MaxOpenReportClassify string `description:"打开次数最多报告的栏目"`
  26. MaxOpenReportCount int `description:"打开次数最多报告的栏目下,用户阅读的报告数"`
  27. TotalReadDuration float64 `description:"总阅读时长"`
  28. TotalReportDayCount int `description:"总阅读晨报数"`
  29. TotalReportWeekCount int `description:"总阅读周报数"`
  30. TotalReportMonthCount int `description:"总阅读月报数"`
  31. TotalReportTwoWeekCount int `description:"总阅读双周报数"`
  32. TotalReportRddpCount int `description:"总阅读点评数"`
  33. TotalReport int `description:"总阅读报告数"`
  34. LearnDay int `description:"连续学习天数"`
  35. CreateTime time.Time `description:"创建时间"`
  36. }
  37. //添加用户信息
  38. func AddAnnualReport(item *AnnualReport) (lastId int64, err error) {
  39. o := orm.NewOrm()
  40. lastId, err = o.Insert(item)
  41. return
  42. }