article_ask.go 836 B

123456789101112131415161718192021222324252627282930
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxArticleAsk struct {
  7. AskId int `orm:"column(ask_id);pk" description:"带问id"`
  8. UserId int `description:"用户id"`
  9. ArticleId int `description:"文章id"`
  10. CreateTime time.Time `description:"创建时间"`
  11. Mobile string `description:"手机号"`
  12. Email string `description:"邮箱"`
  13. CompanyId int `description:"公司id"`
  14. CompanyName string `description:"公司名称"`
  15. Content string `description:"内容"`
  16. }
  17. //添加优化建议
  18. func AddArticleAsk(item *CygxArticleAsk) (lastId int64, err error) {
  19. o := orm.NewOrm()
  20. lastId, err = o.Insert(item)
  21. return
  22. }
  23. type AddArticleAskRep struct {
  24. ArticleId int `description:"文章id"`
  25. Content string `description:"内容"`
  26. }