diff --git a/main-server/src/main/java/com/sickgyun/server/coffeechat/domain/CoffeeChat.java b/main-server/src/main/java/com/sickgyun/server/coffeechat/domain/CoffeeChat.java index 58098b6..0ca15ec 100644 --- a/main-server/src/main/java/com/sickgyun/server/coffeechat/domain/CoffeeChat.java +++ b/main-server/src/main/java/com/sickgyun/server/coffeechat/domain/CoffeeChat.java @@ -26,7 +26,9 @@ public class CoffeeChat { @Column(name = "coffee_chat_id") private Long id; - private String message; + private String sendMessage; + + private String rejectMessage; @Enumerated(EnumType.STRING) private State state; @@ -39,8 +41,8 @@ public class CoffeeChat { @JoinColumn(name = "from_user_id") private User fromUser; - public CoffeeChat(String message, State state, User fromUser) { - this.message = message; + public CoffeeChat(String sendMessage, State state, User fromUser) { + this.sendMessage = sendMessage; this.state = state; this.fromUser = fromUser; } @@ -49,9 +51,9 @@ public void updateToUser(User toUser) { this.toUser = toUser; } - public void updateState(State state, String message) { + public void reject(State state, String rejectMessage) { this.state = state; - this.message = message; + this.rejectMessage = rejectMessage; } public void updateState(State state) { diff --git a/main-server/src/main/java/com/sickgyun/server/coffeechat/service/CommandCoffeeChatService.java b/main-server/src/main/java/com/sickgyun/server/coffeechat/service/CommandCoffeeChatService.java index e89ac52..eb7d136 100644 --- a/main-server/src/main/java/com/sickgyun/server/coffeechat/service/CommandCoffeeChatService.java +++ b/main-server/src/main/java/com/sickgyun/server/coffeechat/service/CommandCoffeeChatService.java @@ -51,7 +51,7 @@ public void reject(User user, Long coffeeChatId, String message) { CoffeeChat coffeeChat = coffeeChatReader.read(coffeeChatId); coffeeChatValidator.shouldBeSameUser(user, coffeeChat.getToUser()); coffeeChatValidator.shouldBePending(coffeeChat); - coffeeChatUpdater.updateState(coffeeChat, REJECT, message); + coffeeChatUpdater.reject(coffeeChat, REJECT, message); mailService.sendMail(coffeeChat); } diff --git a/main-server/src/main/java/com/sickgyun/server/coffeechat/service/implementation/CoffeeChatUpdater.java b/main-server/src/main/java/com/sickgyun/server/coffeechat/service/implementation/CoffeeChatUpdater.java index b83cd6c..24e6a8d 100644 --- a/main-server/src/main/java/com/sickgyun/server/coffeechat/service/implementation/CoffeeChatUpdater.java +++ b/main-server/src/main/java/com/sickgyun/server/coffeechat/service/implementation/CoffeeChatUpdater.java @@ -11,8 +11,8 @@ @RequiredArgsConstructor public class CoffeeChatUpdater { - public void updateState(CoffeeChat coffeeChat, State state, String message) { - coffeeChat.updateState(state, message); + public void reject(CoffeeChat coffeeChat, State state, String message) { + coffeeChat.reject(state, message); } public void updateState(CoffeeChat coffeeChat, State state) {