comment.go
2.6 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
package protocol
const (
SourceTypeChance = 1
SourceTypeComment = 2
SourceTypeBulletin = 3
)
/*IComment */
type ICommentRequest struct {
Content string `json:"content" valid:"Required"`
SourceType int `json:"type" valid:"Required"` //1.机会 2:评论
Id int64 `json:"id" valid:"Required"`
}
type ICommentResponse struct {
Id int64 `json:"id"`
Provider *BaseUserInfo `json:"provider"`
CreateTime int64 `json:"createTime"`
Content string `json:"content"`
}
/*IComments */
type ICommentsRequest struct {
LastId int64 `json:"lastId"`
PageSize int `json:"pageSize" valid:"Required"`
}
type ICommentsResponse struct {
Comments []*IComments `json:"comments"`
Total int `json:"total"`
}
type IComments struct {
//question `json:"question"`
Comment *ICommentResponse `json:"comment"`
}
/*机会评论*/
type CommentsRequest struct {
LastId int64 `json:"lastId"`
PageSize int `json:"pageSize" valid:"Required"`
SourceId int64 `json:"id" valid:"Required"`
SourceType int `json:"sourceType" valid:"Required"` //1:机会 2:评论
}
type CommentsResponse struct {
Comments []*Comments `json:"comments"`
Total int `json:"total"`
}
/*Thumbsups 点赞列表*/
type ThumbsupsRequest struct {
LastId int64 `json:"lastId"`
PageSize int `json:"pageSize" valid:"Required"`
SourceId int64 `json:"id" valid:"Required"`
SourceType int `json:"sourceType" valid:"Required"` //1:机会 2:评论
}
type ThumbsupsResponse struct {
Thumbups []*Thumbups `json:"thumbups"`
Total int `json:"total"`
}
/*评论列表*/
type Comments struct {
Id int64 `json:"id"`
CreateTime int64 `json:"createTime"`
Content string `json:"content"`
Provider *BaseUserInfo `json:"provider"`
ViewTotal int `json:"pageViewTotal"`
CommentTotal int `json:"commentTotal"`
ZanTotal int `json:"thumbsupTotal"`
IsZan int `json:"isThumbsUp"` //0:未点赞 1:点赞
}
type Thumbups struct {
Id int64 `json:"id"`
CreateTime int64 `json:"createTime"`
Provider *BaseUserInfo `json:"provider"`
}
/*CommentDetailsMulti */
type CommentDetailsMultiRequest struct {
SourceId int64 `json:"cid"`
LastId int64 `json:"commentLastId"`
PageSize int `json:"commentPageSize" valid:"Required"`
}
type CommentDetailsMultiResponse struct {
Comment *Comments `json:"comment"`
Comments []*Comments `json:"comments"`
}
/*CommentDetailsSingle */
type CommentDetailsSingleRequest struct {
Id int64 `json:"cid" valid:"Required"`
}
type CommentDetailsSingleResponse struct {
Comment *Comments `json:"comment"`
}