diff --git a/BlogPlatform/BlogPlatform.csproj b/BlogPlatform/BlogPlatform.csproj index b30219f..15a03ab 100644 --- a/BlogPlatform/BlogPlatform.csproj +++ b/BlogPlatform/BlogPlatform.csproj @@ -22,10 +22,6 @@ - - - - diff --git a/BlogPlatform/DTO/Comment/Request/CreateCommentDto.cs b/BlogPlatform/DTO/Comment/Request/CreateCommentDto.cs new file mode 100644 index 0000000..43a57b5 --- /dev/null +++ b/BlogPlatform/DTO/Comment/Request/CreateCommentDto.cs @@ -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; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Comment/Request/UpdateCommentDto.cs b/BlogPlatform/DTO/Comment/Request/UpdateCommentDto.cs new file mode 100644 index 0000000..49606f1 --- /dev/null +++ b/BlogPlatform/DTO/Comment/Request/UpdateCommentDto.cs @@ -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; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Comment/Response/GetCommentDto.cs b/BlogPlatform/DTO/Comment/Response/GetCommentDto.cs new file mode 100644 index 0000000..e341d71 --- /dev/null +++ b/BlogPlatform/DTO/Comment/Response/GetCommentDto.cs @@ -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; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Post/Request/CreatePostDto.cs b/BlogPlatform/DTO/Post/Request/CreatePostDto.cs new file mode 100644 index 0000000..99e88b1 --- /dev/null +++ b/BlogPlatform/DTO/Post/Request/CreatePostDto.cs @@ -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; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Post/Request/PatchPostDecrementLikeDto.cs b/BlogPlatform/DTO/Post/Request/PatchPostDecrementLikeDto.cs new file mode 100644 index 0000000..07cab01 --- /dev/null +++ b/BlogPlatform/DTO/Post/Request/PatchPostDecrementLikeDto.cs @@ -0,0 +1,7 @@ +namespace BlogPlatform.DTO.Post.Request; + +public class PatchPostDecrementLikeDto +{ + public int Id { get; set; } + public int Likes { get; set; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Post/Request/PatchPostIncrementLikeDto.cs b/BlogPlatform/DTO/Post/Request/PatchPostIncrementLikeDto.cs new file mode 100644 index 0000000..d1e85e4 --- /dev/null +++ b/BlogPlatform/DTO/Post/Request/PatchPostIncrementLikeDto.cs @@ -0,0 +1,7 @@ +namespace BlogPlatform.DTO.Post.Request; + +public class PatchPostIncrementLikeDto +{ + public int Id { get; set; } + public int Likes { get; set; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Post/Request/UpdatePostDto.cs b/BlogPlatform/DTO/Post/Request/UpdatePostDto.cs new file mode 100644 index 0000000..c5b4c89 --- /dev/null +++ b/BlogPlatform/DTO/Post/Request/UpdatePostDto.cs @@ -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; } +} \ No newline at end of file diff --git a/BlogPlatform/DTO/Post/Response/GetPostDto.cs b/BlogPlatform/DTO/Post/Response/GetPostDto.cs new file mode 100644 index 0000000..c3b03f5 --- /dev/null +++ b/BlogPlatform/DTO/Post/Response/GetPostDto.cs @@ -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? Comments { get; set; } +} \ No newline at end of file