feat:完成评论功能

This commit is contained in:
橙子
2023-03-23 00:08:55 +08:00
parent 30329ea4db
commit 8213f6f8d7
13 changed files with 240 additions and 32 deletions

View File

@@ -24,6 +24,71 @@
Comment输入创建对象
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentCreateInputVo.Content">
<summary>
评论id
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentCreateInputVo.DiscussId">
<summary>
主题id
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentCreateInputVo.RootId">
<summary>
第一层评论id第一层为0
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentCreateInputVo.ParentId">
<summary>
被回复的CommentId第一层为0
</summary>
</member>
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetListOutputDto">
<summary>
评论多反
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetListOutputDto.DiscussId">
<summary>
主题id
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetListOutputDto.CreateUser">
<summary>
用户,评论人用户信息
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetListOutputDto.CommentedUser">
<summary>
被评论的用户信息
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetListOutputDto.Children">
<summary>
这个不是一个树形而是存在一个二维数组该Children只有在顶级时候只有一层
</summary>
</member>
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetOutputDto">
<summary>
单返回,返回单条评论即可
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetOutputDto.User">
<summary>
用户id联表为用户对象
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetOutputDto.RootId">
<summary>
根节点的评论id
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.CommentGetOutputDto.ParentId">
<summary>
被回复的CommentId
</summary>
</member>
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussCreateInputVo">
<summary>
Discuss输入创建对象

View File

@@ -13,17 +13,23 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
public class CommentCreateInputVo
{
/// <summary>
/// 评论id
/// </summary>
public string Content { get; set; }
/// <summary>
/// 主题id
/// </summary>
public long DiscussId { get; set; }
/// <summary>
/// 根节点的评论id这里也可根据树形查询获取到根节点,但是不够优雅,前端是二维数组,选择前端传值即可,如果是根传0如果不是
/// 第一层评论id第一层为0
/// </summary>
public long RootId { get; set; }
/// <summary>
/// 被回复的CommentId
/// 被回复的CommentId第一层为0
/// </summary>
public long ParentId { get; set; }
}

View File

@@ -19,10 +19,6 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
public DateTime? CreateTime { get; set; }
public string Content { get; set; }
/// <summary>
/// 根节点的评论id
/// </summary>
public long RootId { get; set; }
/// <summary>
/// 主题id
@@ -31,16 +27,21 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
public long ParentId { get; set; }
public long RootId { get; set; }
/// <summary>
/// 用户,评论人用户信息,被评论的用户信息,是他的上一个节点评论
/// 用户,评论人用户信息
/// </summary>
public UserGetOutputDto User { get; set; }
public UserGetOutputDto CreateUser { get; set; }
/// <summary>
/// 被评论的用户信息
/// </summary>
public UserGetOutputDto CommentedUser { get; set; }
/// <summary>
/// 这个不是一个树形而是存在一个二维数组该Children只有一层
/// 这个不是一个树形而是存在一个二维数组该Children只有在顶级时候,只有一层
/// </summary>
public List<CommentGetListOutputDto> Children { get; set; } = new List<CommentGetListOutputDto>();
}