123456789101112131415161718192021222324252627282930313233343536 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- // EnglishReportEmailPV 英文研报-邮箱pv
- type EnglishReportEmailPV struct {
- Id int `orm:"column(id);pk"`
- ReportId int `description:"英文报告ID"`
- EmailId int `description:"邮箱ID"`
- CreateTime time.Time `description:"创建时间"`
- }
- func (item *EnglishReportEmailPV) TableName() string {
- return "english_report_email_pv"
- }
- func (item *EnglishReportEmailPV) Create() (err error) {
- o := orm.NewOrmUsingDB("rddp")
- id, err := o.Insert(item)
- if err != nil {
- return
- }
- item.Id = int(id)
- return
- }
- // InsertTrialEnglishReportEmailPV ETA试用平台-新增英文邮箱PV
- func InsertTrialEnglishReportEmailPV(item *EnglishReportEmailPV) (err error) {
- o := orm.NewOrmUsingDB("rddp_trial")
- sql := `INSERT INTO english_report_email_pv VALUE(?, ?, ?)`
- _, err = o.Raw(sql, item.ReportId, item.EmailId, item.CreateTime).Exec()
- return
- }
|