package models import ( "eta_gn/eta_chart_lib/global" "time" ) type ShareChartRefreshLog struct { Id int `gorm:"column:id;primaryKey" description:"主键ID" orm:"column(id);pk"` Ip string `gorm:"column:ip" description:"来源IP"` ChartId int `gorm:"column:chart_id" description:"图表分类ID"` CreateTime time.Time `gorm:"column:create_time" description:"创建时间"` } func AddShareChartRefreshLog(item *ShareChartRefreshLog) (lastId int64, err error) { o := global.DmSQL["data"] err = o.Create(item).Error lastId = int64(item.Id) return }