You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. package article
  2. import (
  3. "github.com/gogf/gf/v2/frame/g"
  4. "github.com/gogf/gf/v2/os/gtime"
  5. )
  6. type ArticleReq struct {
  7. g.Meta `path:"/addArticle" method:"post" tags:"添加文章"`
  8. //Article表字段
  9. UserId int64 `p:"userId" v:"required" dc:"用户 ID"`
  10. ArticleTitle string `p:"articleTitle" dc:"文章标题"`
  11. ArticleContent string `p:"articleContent" dc:"文章内容"`
  12. VoteStatus int `p:"voteStatus" dc:"是否投票"`
  13. //VotePoll表字段
  14. ArticleId int64 `p:"articleId" dc:"文章ID"`
  15. VoteTitle string `p:"voteTitle" dc:"投票标题"`
  16. MultiOption int `p:"multiOption" dc:"是否多选"`
  17. DeadlineTime *gtime.Time `p:"deadlineTime" dc:"截止时间"`
  18. Status int `p:"status" dc:"投票活动状态" d:"1"`
  19. //VoteOption表字段
  20. VoteId int64 `p:"voteId" dc:"投票活动ID"`
  21. OptionList []OptionList `p:"optionList" dc:"投票选项与第几个选项"`
  22. }
  23. type OptionList struct {
  24. OptionIndex int `json:"optionIndex" v:"required" dc:"选项序号"`
  25. OptionContent string `json:"optionContent" v:"required#选项不能为空" dc:"投票选项"`
  26. }
  27. type ArticleRes struct {
  28. g.Meta `mime:"application/json"`
  29. }