report_view_log.go 447 B

1234567891011121314151617181920
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type ReportViewLog struct {
  7. Id int `orm:"column(id);pk"`
  8. UserId int `description:"用户id"`
  9. ReportId int `description:"报告id"`
  10. CreateTime time.Time `description:"创建时间"`
  11. }
  12. //添加报告阅读记录
  13. func AddReportViewLog(item *ReportViewLog) (err error) {
  14. o := orm.NewOrmUsingDB("rddp")
  15. _, err = o.Insert(item)
  16. return
  17. }