share_chart_refresh_log.go 514 B

123456789101112131415161718192021
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. // ShareChartRefreshLog 分享图表的日志
  7. type ShareChartRefreshLog struct {
  8. Id int `orm:"column(id);pk"`
  9. Ip string `description:"来源ip"`
  10. ChartId int `description:"图表分类id"`
  11. CreateTime time.Time
  12. }
  13. // AddShareChartRefreshLog 添加日志
  14. func AddShareChartRefreshLog(item *ShareChartRefreshLog) (lastId int64, err error) {
  15. o := orm.NewOrmUsingDB("data")
  16. lastId, err = o.Insert(item)
  17. return
  18. }