created all dtos
This commit is contained in:
@@ -22,10 +22,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="DTO\Comment\Request\" />
|
||||
<Folder Include="DTO\Comment\Response\" />
|
||||
<Folder Include="DTO\Post\Request\" />
|
||||
<Folder Include="DTO\Post\Response\" />
|
||||
<Folder Include="Endpoints\Comment\" />
|
||||
<Folder Include="Endpoints\Post\" />
|
||||
<Folder Include="Endpoints\User\" />
|
||||
|
8
BlogPlatform/DTO/Comment/Request/CreateCommentDto.cs
Normal file
8
BlogPlatform/DTO/Comment/Request/CreateCommentDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace BlogPlatform.DTO.Comment.Request;
|
||||
|
||||
public class CreateCommentDto
|
||||
{
|
||||
public string? Content { get; set; }
|
||||
public int PostId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
10
BlogPlatform/DTO/Comment/Request/UpdateCommentDto.cs
Normal file
10
BlogPlatform/DTO/Comment/Request/UpdateCommentDto.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace BlogPlatform.DTO.Comment.Request;
|
||||
|
||||
public class UpdateCommentDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public DateOnly CreatedAt { get; set; }
|
||||
public int PostId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
10
BlogPlatform/DTO/Comment/Response/GetCommentDto.cs
Normal file
10
BlogPlatform/DTO/Comment/Response/GetCommentDto.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace BlogPlatform.DTO.Comment.Response;
|
||||
|
||||
public class GetCommentDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public DateOnly CreatedAt { get; set; }
|
||||
public int PostId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
9
BlogPlatform/DTO/Post/Request/CreatePostDto.cs
Normal file
9
BlogPlatform/DTO/Post/Request/CreatePostDto.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace BlogPlatform.DTO.Post.Request;
|
||||
|
||||
public class CreatePostDto
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public int Likes { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace BlogPlatform.DTO.Post.Request;
|
||||
|
||||
public class PatchPostDecrementLikeDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Likes { get; set; }
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace BlogPlatform.DTO.Post.Request;
|
||||
|
||||
public class PatchPostIncrementLikeDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Likes { get; set; }
|
||||
}
|
11
BlogPlatform/DTO/Post/Request/UpdatePostDto.cs
Normal file
11
BlogPlatform/DTO/Post/Request/UpdatePostDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace BlogPlatform.DTO.Post.Request;
|
||||
|
||||
public class UpdatePostDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public int Likes { get; set; }
|
||||
public DateOnly CreatedAt { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
14
BlogPlatform/DTO/Post/Response/GetPostDto.cs
Normal file
14
BlogPlatform/DTO/Post/Response/GetPostDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using BlogPlatform.DTO.Comment.Response;
|
||||
|
||||
namespace BlogPlatform.DTO.Post.Response;
|
||||
|
||||
public class GetPostDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public int Likes { get; set; }
|
||||
public DateOnly CreatedAt { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public List<GetCommentDto>? Comments { get; set; }
|
||||
}
|
Reference in New Issue
Block a user