🎨 update code structure
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package comment_controller
|
||||
|
||||
// CommentRequest 评论请求参数
|
||||
type CommentRequest struct {
|
||||
Content string `json:"content" binding:"required"`
|
||||
Images []string `json:"images"`
|
||||
@@ -9,6 +10,8 @@ type CommentRequest struct {
|
||||
Key string `json:"key" binding:"required"`
|
||||
Point []int64 `json:"point" binding:"required"`
|
||||
}
|
||||
|
||||
// ReplyCommentRequest 回复评论请求参数
|
||||
type ReplyCommentRequest struct {
|
||||
Content string `json:"content" binding:"required"`
|
||||
Images []string `json:"images"`
|
||||
@@ -21,6 +24,7 @@ type ReplyCommentRequest struct {
|
||||
Point []int64 `json:"point" binding:"required"`
|
||||
}
|
||||
|
||||
// ReplyReplyRequest 回复回复请求参数
|
||||
type ReplyReplyRequest struct {
|
||||
Content string `json:"content" binding:"required"`
|
||||
Images []string `json:"images"`
|
||||
@@ -34,6 +38,7 @@ type ReplyReplyRequest struct {
|
||||
Point []int64 `json:"point" binding:"required"`
|
||||
}
|
||||
|
||||
// CommentListRequest 评论列表请求参数
|
||||
type CommentListRequest struct {
|
||||
UserID string `json:"user_id" binding:"required"`
|
||||
TopicId string `json:"topic_id" binding:"required"`
|
||||
@@ -41,6 +46,8 @@ type CommentListRequest struct {
|
||||
Size int `json:"size" default:"5"`
|
||||
IsHot bool `json:"is_hot" default:"true"`
|
||||
}
|
||||
|
||||
// ReplyListRequest 回复列表请求参数
|
||||
type ReplyListRequest struct {
|
||||
UserID string `json:"user_id" binding:"required"`
|
||||
TopicId string `json:"topic_id" binding:"required"`
|
||||
@@ -48,6 +55,8 @@ type ReplyListRequest struct {
|
||||
Page int `json:"page" default:"1"`
|
||||
Size int `json:"size" default:"5"`
|
||||
}
|
||||
|
||||
// CommentLikeRequest 点赞评论的请求参数
|
||||
type CommentLikeRequest struct {
|
||||
TopicId string `json:"topic_id" binding:"required"`
|
||||
CommentId int64 `json:"comment_id" binding:"required"`
|
||||
|
Reference in New Issue
Block a user