advice.go 1015 B

1234567891011121314151617181920212223242526272829303132
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxAdvice struct {
  7. AdviceId int `orm:"column(advice_id);pk" description:"优化建议id"`
  8. UserId int `description:"用户id"`
  9. UserRealName string `description:"姓名"`
  10. CompanyId int `description:"公司id"`
  11. CompanyName string `description:"公司名称"`
  12. SalesRealName string `description:"所属销售"`
  13. Advice string `description:"优化建议"`
  14. AdviceImgUrl string `description:"图片,多张用#分割"`
  15. CreateTime time.Time `description:"提交建议时间"`
  16. Mobile string `description:"手机号"`
  17. Email string `description:"邮箱"`
  18. }
  19. //添加优化建议
  20. func AddCygxAdvice(item *CygxAdvice) (lastId int64, err error) {
  21. o := orm.NewOrm()
  22. lastId, err = o.Insert(item)
  23. return
  24. }
  25. type AddCygxAdviceReq struct {
  26. Advice string `description:"优化建议"`
  27. AdviceImgUrl string `description:"图片,多张用#分割"`
  28. }