ht_report.go 783 B

1234567891011121314151617181920212223242526272829
  1. package ht
  2. import "eta/eta_mini_ht_api/models"
  3. type HTReport struct {
  4. ID int `gorm:"primary_key;auto_increment"`
  5. Plate string `gorm:"column:plate"`
  6. Author string `gorm:"column:author"`
  7. Permission string `gorm:"column:permission"`
  8. Title string `gorm:"column:title;size:125;"`
  9. Abstract string `gorm:"column:abstract;size:255;"`
  10. PublishTime string `gorm:"column:publish_time"`
  11. }
  12. func GetHTReports(id int) (reports []HTReport, err error) {
  13. db := models.HT()
  14. sql := "select * from report where id >? order by id asc"
  15. err = db.Model(&HTReport{}).Raw(sql, id).Scan(&reports).Error
  16. return
  17. }
  18. type HtQuery struct {
  19. Plate string
  20. Permission string
  21. }
  22. func GetHTReportIdsByPermissionIds(query []HtQuery) (ids []int, err error) {
  23. return
  24. }