vote.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package v1
  2. import (
  3. "property-household-gateway/param/base"
  4. "property-household-gateway/pb/v1"
  5. )
  6. type VoteListForHouseholdQuery struct {
  7. Page int64 `form:"page" json:"page"`
  8. PageSize int64 `form:"page_size" json:"page_size"`
  9. Title string `form:"title" json:"title"`
  10. GardenId int64 `form:"garden_id" json:"garden_id"`
  11. }
  12. type VoteListForHouseholdRequest struct {
  13. base.Header
  14. VoteListForHouseholdQuery
  15. }
  16. type VoteListForHouseholdResponse struct {
  17. base.Result
  18. Data v1.VoteListForHouseholdReply `json:"data"`
  19. }
  20. type VoteTopicAnswer struct {
  21. // 题目编号
  22. Number int64 `form:"number" json:"number"`
  23. // 题目类型
  24. TopicType int32 `form:"topic_type" json:"topic_type"`
  25. // 问答题回答,当题目类型为问答题时有效
  26. CompletionAnswers []string `form:"completion_answers" json:"completion_answers"`
  27. // 选择题回答,当题目类型为选择题时有效
  28. ChoiceAnswers []string `form:"choice_answers" json:"choice_answers"`
  29. // 评分题回答,当题目类型为评分题时有效
  30. StarAnswers int32 `form:"star_answers" json:"star_answers"`
  31. }
  32. type VoteAddAnswerBody struct {
  33. Id int64 `form:"id" json:"id"`
  34. GardenId int64 `form:"garden_id" json:"garden_id"`
  35. Answers []VoteTopicAnswer `form:"answers" json:"answers"`
  36. }
  37. type VoteAddAnswerRequest struct {
  38. base.Header
  39. VoteAddAnswerBody
  40. }
  41. type VoteAddAnswerResponse struct {
  42. base.Result
  43. }
  44. type VoteResultStatisticQuery struct {
  45. // 投票id
  46. Id int64 `form:"id" json:"id"`
  47. GardenId int64 `form:"garden_id" json:"garden_id"`
  48. }
  49. type VoteResultStatisticRequest struct {
  50. base.Header
  51. VoteResultStatisticQuery
  52. }
  53. type VoteResultStatisticResponse struct {
  54. base.Result
  55. Data v1.VoteResultStatisticReply `json:"data"`
  56. }