comment.go
2.0 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
package protocol
const (
SourceType_Chance = 1
SourceType_Comment = 2
)
/*IComment */
type ICommentRequest struct {
Content string `json:"content" valid:"Required"`
SourceType int `json:"type" valid:"Required"`
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
}
type CommentsResponse struct {
Total int `json:"total"`
Comments []*Comments `json:"comments"`
}
/*评论列表*/
type Comments struct {
Id int64 `json:"id"`
Provider *BaseUserInfo `json:"provider"`
Content string `json:"content"`
ViewTotal int `json:"pageView"`
CommentTotal int `json:"commentTotal"`
ZanTotal int `json:"zanTotal"`
CreateTime int64 `json:"createTime"`
IsZan int `json:"is_zan"` //0:未点赞 1:点赞
}
/*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"`
}