package ht import "eta/eta_mini_ht_api/models" type HTReport struct { ID int `gorm:"primary_key;auto_increment"` Plate string `gorm:"column:plate"` Author string `gorm:"column:author"` Permission string `gorm:"column:permission"` Title string `gorm:"column:title;size:125;"` Abstract string `gorm:"column:abstract;size:255;"` PublishTime string `gorm:"column:publish_time"` } func GetHTReports(id int) (reports []HTReport, err error) { db := models.HT() sql := "select * from report where id >? order by id asc" err = db.Model(&HTReport{}).Raw(sql, id).Scan(&reports).Error return }