report_view_record.go 467 B

1234567891011121314151617181920212223
  1. package models
  2. import (
  3. "rdluck_tools/orm"
  4. "time"
  5. )
  6. type ReportViewRecord 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 AddReportViewRecord(item *ReportViewRecord) (err error) {
  14. o := orm.NewOrm()
  15. o.Using("rddp")
  16. _, err = o.Insert(item)
  17. return
  18. }
  19. //修改最新阅读时间