Skip to content

Commit

Permalink
Refactor: 게시글 목록 반환 응답 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhacandy authored Aug 18, 2024
2 parents 7356ca1 + f98e25e commit a647685
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package cotato.growingpain.post.dto.response;

import cotato.growingpain.post.domain.entity.Post;
import java.time.LocalDateTime;

public record PostResponse(

Long postId,
LocalDateTime createdAt,
LocalDateTime modifiedAt,
String title,
String content,
String postImageUrl,
Expand All @@ -17,7 +21,10 @@ public record PostResponse(
) {
public static PostResponse from(Post post) {
return new PostResponse(

post.getId(),
post.getCreatedAt(),
post.getModifiedAt(),
post.getTitle(),
post.getContent(),
post.getImageUrl(),
Expand Down

0 comments on commit a647685

Please sign in to comment.