package models import ( "github.com/beego/beego/v2/client/orm" "time" ) // ShareChartRefreshLog 分享图表的日志 type ShareChartRefreshLog struct { Id int `orm:"column(id);pk"` Ip string `description:"来源ip"` ChartId int `description:"图表分类id"` CreateTime time.Time } // AddShareChartRefreshLog 添加日志 func AddShareChartRefreshLog(item *ShareChartRefreshLog) (lastId int64, err error) { o := orm.NewOrmUsingDB("data") lastId, err = o.Insert(item) return }