package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type AnnualReport struct { AnnualReportId int `orm:"column(annual_report_id);pk"` AnnualReportDate string `description:"报告年度"` UserId int `description:"用户id"` Mobile string `description:"手机号"` Email string `description:"邮箱"` CompanyId int `description:"公司id"` RealName string `description:"用户实际名称"` TogetherDay string `description:"相伴天数"` CreateDate string `description:"创建时间"` FirstReadReportType string `description:"首次阅读报告类型"` FirstReadReportTitle string `description:"首次阅读报告标题"` ListenReportCount int `description:"收听报告次数"` ListenReportDuration float64 `description:"收听报告时长"` MaxReadReportDate string `description:"阅读报告最多的一天"` MaxReadReportCount int `description:"阅读报告最多的一天,报告数量"` LatestReadReportDate string `description:"阅读报告时间最晚的一天"` LatestReadReportTime string `description:"阅读报告时间最晚的一天,最晚的时间"` LatestReadReportDateDuration float64 `description:"阅读报告时间最晚的一天,总共阅读报告的时长"` MaxOpenReportClassify string `description:"打开次数最多报告的栏目"` MaxOpenReportCount int `description:"打开次数最多报告的栏目下,用户阅读的报告数"` TotalReadDuration float64 `description:"总阅读时长"` TotalReportDayCount int `description:"总阅读晨报数"` TotalReportWeekCount int `description:"总阅读周报数"` TotalReportMonthCount int `description:"总阅读月报数"` TotalReportTwoWeekCount int `description:"总阅读双周报数"` TotalReportRddpCount int `description:"总阅读点评数"` TotalReport int `description:"总阅读报告数"` LearnDay int `description:"连续学习天数"` CreateTime time.Time `description:"创建时间"` } //添加用户信息 func AddAnnualReport(item *AnnualReport) (lastId int64, err error) { o := orm.NewOrm() lastId, err = o.Insert(item) return }