package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type CygxArticleAndYanxuanRecord struct { Id int `orm:"column(id);pk"` SourceId int `description:"资源ID"` Source string `description:"资源I类型 文章、研选专栏"` UserId int `description:"用户ID"` CreateTime string `description:"创建时间"` Mobile string `description:"手机号"` Email string `description:"邮箱"` CompanyId int `description:"公司id"` CompanyName string `description:"公司名称"` ModifyTime time.Time `description:"修改时间"` RealName string `description:"用户实际名称"` SellerName string `description:"所属销售"` StopTime int `description:"停留时间"` RegisterPlatform int `description:"来源 1小程序,2:网页"` } // 批量添加 func AddCygxArticleAndYanxuanRecordMulti(items []*CygxArticleAndYanxuanRecord) (err error) { o := orm.NewOrm() if len(items) > 0 { //批量添加 _, err = o.InsertMulti(len(items), items) } return }