bulletin.go
2.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
package protocol
/*BulletinRelease */
type BulletinReleaseRequest 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 []string `json:"receiver" valid:"Required"`
Question Question `json:"question"`
Cover Cover `json:"cover" valid:"Required"`
}
type Question struct {
Id int `json:"id"`
Type int `json:"type" valid:"Required"`
Title string `json:"title" valid:"Required"`
Content []QuestionContent `json:"content" valid:"Required"`
}
type QuestionContent struct {
Id int
Content string
}
type Cover struct {
Path string `json:"path"`
H int `json:"h"`
W int `json:"w"`
}
type BulletinReleaseResponse struct {
}
/*BulletinList */
type BulletinListRequest struct {
Status int8 `json:"status"` //1:待上架 2:上架
Page int `json:"page"`
PageSize int `json:"page_size"`
}
type BulletinListResponse struct {
List []*BulletinItem `json:"list"`
Total int
}
type BulletinItem struct {
Id int `json:"id"`
Type int8 `json:"type"`
Title string `json:"title"`
Status int8 `json:"status"`
Receiver []string `json:"receiver" valid:"Required"`
CreateAt string `json:"time"`
}
/*GetBulletin */
type GetBulletinRequest struct {
}
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 []string `json:"receiver" valid:"Required"`
Question Question `json:"question"`
Cover Cover `json:"cover" valid:"Required"`
}
/*UpdateBulletin */
type UpdateBulletinRequest struct {
Id int `json:"id" valid:"Required"`
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 []string `json:"receiver" valid:"Required"`
Question Question `json:"question"`
Cover Cover `json:"cover" valid:"Required"`
}
type UpdateBulletinResponse struct {
}