package models import "github.com/beego/beego/v2/client/orm" type UserTemplateRecord struct { ID int `description:"id"` UserID int `description:"用户id"` OpenID string `description:"用户openid"` Resource string `description:"openid"` // 资源:报告id/手机号/活动id SendData string `description:"发送内容"` Result string `description:"响应结果"` CreateDate string `description:"创建日期"` CreateTime string `description:"创建时间"` SendStatus int `description:"发送状态"` // 1:发送成功,0:发送失败 SendType int `description:"发送消息类型"` // 1:报告模板消息 } func (u *UserTemplateRecord) Insert() (err error) { o := orm.NewOrm() _, err = o.Insert(u) return }