From fd2e1e5a1d233d51a216558ee99c7b4417cc80ad Mon Sep 17 00:00:00 2001 From: xhaktmchl Date: Sun, 4 Dec 2022 15:44:05 +0900 Subject: [PATCH] =?UTF-8?q?#23=20refactor:=20ClipBoardRes=20=EC=97=90=20ti?= =?UTF-8?q?tle=20=ED=95=84=EB=93=9C=20=EB=B0=98=ED=99=98=20=EC=95=88?= =?UTF-8?q?=EB=90=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../board/dto/request/clipboard/CreateClipBoardReq.java | 3 +-- .../server/board/dto/request/clipboard/PatchClipBoardReq.java | 2 +- .../server/board/dto/response/clipboard/ClipBoardRes.java | 2 +- .../main/java/com/yogit/server/board/entity/ClipBoard.java | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/server/src/main/java/com/yogit/server/board/dto/request/clipboard/CreateClipBoardReq.java b/server/src/main/java/com/yogit/server/board/dto/request/clipboard/CreateClipBoardReq.java index 853c6e4..1111f74 100644 --- a/server/src/main/java/com/yogit/server/board/dto/request/clipboard/CreateClipBoardReq.java +++ b/server/src/main/java/com/yogit/server/board/dto/request/clipboard/CreateClipBoardReq.java @@ -20,8 +20,7 @@ public class CreateClipBoardReq { private Long userId; @ApiModelProperty(example = "질문이 있습니다.") - @ApiParam(value = "클립보드 제목", required = true) - @NotBlank + @ApiParam(value = "클립보드 제목", required = false) private String title; @ApiModelProperty(example = "경복궁역 몇 번 출구인가요?") diff --git a/server/src/main/java/com/yogit/server/board/dto/request/clipboard/PatchClipBoardReq.java b/server/src/main/java/com/yogit/server/board/dto/request/clipboard/PatchClipBoardReq.java index 2b27a56..833e7da 100644 --- a/server/src/main/java/com/yogit/server/board/dto/request/clipboard/PatchClipBoardReq.java +++ b/server/src/main/java/com/yogit/server/board/dto/request/clipboard/PatchClipBoardReq.java @@ -20,7 +20,7 @@ public class PatchClipBoardReq { private Long clipBoardId; @ApiModelProperty(example = "질문이 있습니다.") - @ApiParam(value = "클립보드 제목", required = true) + @ApiParam(value = "클립보드 제목", required = false) @NotBlank private String title; diff --git a/server/src/main/java/com/yogit/server/board/dto/response/clipboard/ClipBoardRes.java b/server/src/main/java/com/yogit/server/board/dto/response/clipboard/ClipBoardRes.java index 79d5376..1620d87 100644 --- a/server/src/main/java/com/yogit/server/board/dto/response/clipboard/ClipBoardRes.java +++ b/server/src/main/java/com/yogit/server/board/dto/response/clipboard/ClipBoardRes.java @@ -50,7 +50,7 @@ public static ClipBoardRes toDto(ClipBoard clipBoard){ .clipBoardId(clipBoard.getId()) .userId(clipBoard.getUser().getId()) .boardId(clipBoard.getBoard().getId()) - .title(clipBoard.getTitle()) +// .title(clipBoard.getTitle()) .content(clipBoard.getContent()) .status(clipBoard.getStatus()) .createdAt(clipBoard.getCreatedAt()) diff --git a/server/src/main/java/com/yogit/server/board/entity/ClipBoard.java b/server/src/main/java/com/yogit/server/board/entity/ClipBoard.java index 86ea8a8..f1910e0 100644 --- a/server/src/main/java/com/yogit/server/board/entity/ClipBoard.java +++ b/server/src/main/java/com/yogit/server/board/entity/ClipBoard.java @@ -47,7 +47,7 @@ public class ClipBoard extends BaseEntity { public ClipBoard(CreateClipBoardReq dto, User user, Board board) { this.user = user; this.board = board; - this.title = dto.getTitle(); +// this.title = dto.getTitle(); this.content = dto.getContent(); this.reportedCnt = 0; } @@ -60,7 +60,7 @@ public void deleteClipBoard(){ } public void updateClipBoard(PatchClipBoardReq dto){ - this.title = dto.getTitle(); +// this.title = dto.getTitle(); this.content = dto.getContent(); }