article_and_yanxuan_record.go 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxArticleAndYanxuanRecord struct {
  7. Id int `orm:"column(id);pk"`
  8. SourceId int `description:"资源ID"`
  9. Source string `description:"资源I类型 文章、研选专栏"`
  10. UserId int `description:"用户ID"`
  11. CreateTime string `description:"创建时间"`
  12. Mobile string `description:"手机号"`
  13. Email string `description:"邮箱"`
  14. CompanyId int `description:"公司id"`
  15. CompanyName string `description:"公司名称"`
  16. ModifyTime time.Time `description:"修改时间"`
  17. RealName string `description:"用户实际名称"`
  18. SellerName string `description:"所属销售"`
  19. StopTime int `description:"停留时间"`
  20. RegisterPlatform int `description:"来源 1小程序,2:网页"`
  21. }
  22. // 批量添加
  23. func AddCygxArticleAndYanxuanRecordMulti(items []*CygxArticleAndYanxuanRecord) (err error) {
  24. o := orm.NewOrm()
  25. if len(items) > 0 {
  26. //批量添加
  27. _, err = o.InsertMulti(len(items), items)
  28. }
  29. return
  30. }