package srv_commend import ( "time" "videoweb/pub/pubdef" ) // CommendSearch 查询评论 type CommendSearch struct { ObjectId *int64 `json:"objectId" bson:"objectId"` // 对象ID ObjectType *pubdef.CommentObjectType `json:"objectType" bson:"objectType"` // 对象类型 0=视频 4=短剧 11=短剧剧集 UserName *string `json:"userName" bson:"userName"` // 用户名称 Level *int64 `json:"level" bson:"level"` // 评论级别 Text *string `json:"text" bson:"text"` // 评论内容 ReviewStatus *int `json:"reviewStatus"` PageNum int64 `json:"pageNum"` PageSize int64 `json:"pageSize"` } type PostCommentInfo struct { Id int64 `json:"id" bson:"_id,omitempty"` // 评论ID Ip string `json:"ip" bson:"ip"` // 评论IP ObjectType pubdef.CommentObjectType `json:"objectType" bson:"objectType"` // 对象类型 0=视频 4=短剧 11=短剧剧集 ObjectId int64 `json:"objectId" bson:"objectId"` // 对象ID ObjectName string `json:"objectName" bson:"objectName"` // 对象类型名称 视频/短剧 UserName string `json:"userName" bson:"userName"` // 用户名称 Level int64 `json:"level" bson:"level"` // 评论级别 ParentsId int64 `json:"parentsId" bson:"parentsId"` // 上级评论ID ReplyUserName string `json:"replyUserName" bson:"replyUserName"` // 回复名称 Text string `json:"text" bson:"text"` // 评论内容 ReviewStatus int `json:"reviewStatus" bson:"reviewStatus"` // 审核状态 0 未审核 1审核成功 2 审核失败 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 CreatedAt time.Time `bson:"createdAt" json:"createdAt"` // 创建时间 TopRank int64 `json:"topRank" bson:"topRank"` // 置顶排序 Likes int64 `json:"likes" bson:"likes"` // 点赞数 Status pubdef.UserStatus `json:"status" bson:"status"` // 评论用户的状态 } type CommendSearchResp struct { Total int64 `json:"total"` List []*PostCommentInfo `json:"list"` } type CommendDelete struct { Id *int64 `json:"id" bson:"_id" binding:"required"` // Id } type CommendReplay struct { ObjectId int64 `json:"objectId"` // 对象ID UserName string `json:"userName"` // 用户名 ParentsId int64 `json:"parentsId"` // 评论ID Text string `json:"text"` // 评论内容 Score int64 `json:"score"` // 评分 } type CommendUpdate struct { Score *int64 `json:"score" bson:"score,omitempty"` // 评分 Likes *int64 `json:"likes" bson:"likes,omitempty"` // 点赞数量 } type CommendUpdateReq struct { Param CommendUpdate `json:"param" bson:"param"` // 参数 Id int64 `json:"id" bson:"_id,omitempty"` // 评论ID } type CommendTopReq struct { Id int64 `json:"id" bson:"_id,omitempty"` // 评论ID } type CommendReviewReq struct { Id int64 `json:"id"` ReviewStatus int `json:"reviewStatus"` }