package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type CygxAdvice struct { AdviceId int `orm:"column(advice_id);pk" description:"优化建议id"` UserId int `description:"用户id"` UserRealName string `description:"姓名"` CompanyId int `description:"公司id"` CompanyName string `description:"公司名称"` SalesRealName string `description:"所属销售"` Advice string `description:"优化建议"` AdviceImgUrl string `description:"图片,多张用#分割"` CreateTime time.Time `description:"提交建议时间"` Mobile string `description:"手机号"` Email string `description:"邮箱"` } //添加优化建议 func AddCygxAdvice(item *CygxAdvice) (lastId int64, err error) { o := orm.NewOrm() lastId, err = o.Insert(item) return } type AddCygxAdviceReq struct { Advice string `description:"优化建议"` AdviceImgUrl []string `description:"图片,多张用#分割"` }