Skip to content

Commit

Permalink
Merge pull request #215 from urinaner/refactor/214
Browse files Browse the repository at this point in the history
[BE] [REFACTOR] 게시글 생성일 필드 수정
  • Loading branch information
2Jin1031 authored Dec 22, 2024
2 parents f38d885 + 8446bc0 commit a74ed3a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.example.backend.board.domain.dto;

import java.time.LocalDateTime;
import java.util.List;
import lombok.AccessLevel;
import lombok.Builder;
Expand All @@ -17,19 +16,19 @@ public class BoardResDto {
private String content;
private String writer;
private List<String> fileList;
private String createDate;
private String createdDate;
private int viewCount;
private String category;

@Builder
private BoardResDto(Long id, String title, String content, String writer,
List<String> fileList, String createDate, int viewCount, String category) {
List<String> fileList, String createdDate, int viewCount, String category) {
this.id = id;
this.title = title;
this.content = content;
this.writer = writer;
this.fileList = fileList;
this.createDate = createDate;
this.createdDate = createdDate;
this.viewCount = viewCount;
this.category = category;
}
Expand All @@ -41,7 +40,7 @@ public static BoardResDto of(Board board) {
.content(board.getContent())
.writer(board.getWriter())
.fileList(board.getFileList())
.createDate(TimeParsingUtils.toRelativeTimeFormat(board.getCreatedDate()))
.createdDate(TimeParsingUtils.toRelativeTimeFormat(board.getCreatedDate()))
.viewCount(board.getViewCount())
.category(board.getCategory().name())
.build();
Expand Down

0 comments on commit a74ed3a

Please sign in to comment.