Skip to content

Commit

Permalink
Feat: 날짜 데이터 깔끔하게 프론트로 보내주는 기능 구현 (#163)
Browse files Browse the repository at this point in the history
* #161 - feat: 시간 데이터 예쁘게 프론트로 보내주는 기능 구현
  • Loading branch information
GGHDMS authored Feb 19, 2024
1 parent e468aed commit 1fae160
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cotato.bookitlist.book.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import cotato.bookitlist.book.dto.BookApiDto;

import java.time.LocalDate;
Expand All @@ -8,6 +9,7 @@ public record BookApiResponse(
String title,
String author,
String publisher,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDate pubDate,
String description,
String link,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cotato.bookitlist.book.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import cotato.bookitlist.book.dto.BookDto;

import java.time.LocalDate;
Expand All @@ -8,6 +9,7 @@ public record BookResponse(
String title,
String author,
String publisher,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDate pubDate,
String description,
String link,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cotato.bookitlist.post.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import cotato.bookitlist.post.domain.PostStatus;
import cotato.bookitlist.post.domain.PostTemplate;
import cotato.bookitlist.post.dto.PostDetailDto;
Expand All @@ -15,7 +16,9 @@ public record PostDetailResponse(
List<String> content,
int likeCount,
int viewCount,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDateTime createdAt,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDateTime modifiedAt,
boolean liked,
boolean isMine,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cotato.bookitlist.review.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import cotato.bookitlist.review.domain.ReviewStatus;
import cotato.bookitlist.review.dto.ReviewDetailDto;

Expand All @@ -12,7 +13,9 @@ public record ReviewDetailResponse(
String content,
int likeCount,
int viewCount,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDateTime createdAt,
@JsonFormat(pattern = "yyyy.MM.dd")
LocalDateTime modifiedAt,
boolean liked,
boolean isMine,
Expand Down

0 comments on commit 1fae160

Please sign in to comment.