share_chart_refresh_log.go 593 B

123456789101112131415161718192021
  1. package models
  2. import (
  3. "eta_gn/eta_chart_lib/global"
  4. "time"
  5. )
  6. type ShareChartRefreshLog struct {
  7. Id int `gorm:"column:id;primaryKey" description:"主键ID" orm:"column(id);pk"`
  8. Ip string `gorm:"column:ip" description:"来源IP"`
  9. ChartId int `gorm:"column:chart_id" description:"图表分类ID"`
  10. CreateTime time.Time `gorm:"column:create_time" description:"创建时间"`
  11. }
  12. func AddShareChartRefreshLog(item *ShareChartRefreshLog) (lastId int64, err error) {
  13. o := global.DmSQL["data"]
  14. err = o.Create(item).Error
  15. lastId = int64(item.Id)
  16. return
  17. }