bulletin.go
3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package protocol
const (
BulletinUnRelease = 1 //下架
BulletinRelease = 2 //上架
)
const (
QuestionSingleSelect = 0 //单选
QuestionMultiSelect = 1 //多选
)
/*BulletinRelease */
type BulletinReleaseRequest struct {
Id int `json:"id"`
Type int `json:"type"`
Title string `json:"title" valid:"Required"`
Content string `json:"content" valid:"Required"`
AllowClose int `json:"allow_close"`
//AllowCondition int `json:"allow_condition"`
QuestionSwitch int `json:"question_switch"`
Receiver []VisibleObject `json:"receiver"`
Question Question `json:"question"`
Cover Cover `json:"cover"`
IsPublish int `json:"is_publish"` //是否直接发布 0:否 1:直接发布
}
type Question struct {
Id int `json:"id"`
Type int `json:"type"`
Title string `json:"title" `
Content []QuestionContent `json:"content" valid:"Required"`
}
type QuestionContent struct {
Id int `json:"id"`
Content string `json:"content"`
}
type Cover string
type BulletinReleaseResponse struct {
}
/*BulletinList */
type BulletinListRequest struct {
Status int8 `json:"status"` //1:待上架 2:上架
RequestPageInfo
}
type BulletinListResponse struct {
List []*BulletinItem `json:"lists"`
//Total int
ResponsePageInfo
}
type BulletinItem struct {
Id int `json:"id"`
Type int8 `json:"type"`
Title string `json:"title"`
Status int8 `json:"status"`
Receiver []VisibleObject `json:"receiver" valid:"Required"`
CreateAt string `json:"time"`
}
/*GetBulletin */
type GetBulletinRequest struct {
Id int `json:"id"`
}
type GetBulletinResponse struct {
Id int `json:"id"`
Type int `json:"type" valid:"Required"`
Title string `json:"title" valid:"Required"`
Content string `json:"content" valid:"Required"`
AllowClose int `json:"allow_close"`
//AllowCondition int `json:"allow_condition"`
QuestionSwitch int `json:"question_switch"`
Receiver []VisibleObject `json:"receiver" valid:"Required"`
Question Question `json:"question"`
Cover Cover `json:"cover" valid:"Required"`
}
type Receiver struct {
Id int64 `json:"id"`
NickName string `json:"name"`
}
/*UpdateBulletin */
type UpdateBulletinRequest struct {
Id int `json:"id" valid:"Required"`
Type int `json:"type"`
Title string `json:"title" valid:"Required"`
Content string `json:"content" valid:"Required"`
AllowClose int `json:"allow_close"`
//AllowCondition int `json:"allow_condition"`
QuestionSwitch int `json:"question_switch"`
Receiver []VisibleObject `json:"receiver" valid:"Required"`
Question Question `json:"question"`
Cover Cover `json:"cover" valid:"Required"`
}
type UpdateBulletinResponse struct {
}
/*OperateBulletin */
type OperateBulletinRequest struct {
Id int `json:"id" valid:"Required"`
CmdType int `json:"cmd_type" valid:"Required"` //1:下架 2.上架
}
type OperateBulletinResponse struct {
}
/*BulletinFeedbacks 反馈详情*/
type BulletinFeedbacksRequest struct {
RequestPageInfo
Id int `json:"id" valid:"Required"` //公告编号
}
type BulletinFeedbacksResponse struct {
ResponsePageInfo
List []FeedBackItem `json:"lists"`
}
type FeedBackItem struct {
Time int64 `json:"time"`
Name string `json:"name"`
Content string `json:"content"`
}
type Answer struct {
VoteResults []int `json:"voteResults"`
EditContent string `json:"editContent"`
}
/*ExportFeedBacks */
type ExportFeedBacksRequest struct {
Id int `json:"id"` //公告编号
}
type ExportFeedBacksResponse struct {
}