Skip to content

Commit

Permalink
YEL-40 [fix] 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonjeongs committed Jul 12, 2023
1 parent ddcd352 commit 8465745
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.yello.server.domain.question.dto.response;

import com.yello.server.domain.friend.entity.Friend;
import com.yello.server.domain.user.entity.User;
import lombok.Builder;

@Builder
public record YelloFriend(
Long id,
String yelloId,
Expand All @@ -17,10 +17,4 @@ public static YelloFriend of(Friend friend) {
.build();
}

@Builder
public YelloFriend(Long id, String yelloId, String name) {
this.id = id;
this.yelloId = yelloId;
this.name = name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
import com.yello.server.domain.keyword.entity.Keyword;
import lombok.Builder;

@Builder
public record YelloKeyword(
String keywordName
) {
public static YelloKeyword of(Keyword keyword){
public static YelloKeyword of(Keyword keyword) {
return YelloKeyword.builder()
.keywordName(keyword.getKeywordName())
.build();
}

@Builder
public YelloKeyword(String keywordName) {
this.keywordName = keywordName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import lombok.Builder;

import java.util.Objects;
import java.util.Optional;

@Builder
public record YelloQuestion(
String nameHead,
String nameFoot,
String keywordHead,
String keywordFoot
) {
public static YelloQuestion of(Question question){
public static YelloQuestion of(Question question) {
return YelloQuestion.builder()
.nameHead(Objects.isNull(question.getNameHead()) ? null : question.getNameHead())
.nameFoot(Objects.isNull(question.getNameFoot()) ? null : question.getNameFoot())
Expand All @@ -21,11 +21,5 @@ public static YelloQuestion of(Question question){
.build();
}

@Builder
public YelloQuestion(String nameHead, String nameFoot, String keywordHead, String keywordFoot) {
this.nameHead = nameHead;
this.nameFoot = nameFoot;
this.keywordHead = keywordHead;
this.keywordFoot = keywordFoot;
}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
package com.yello.server.domain.question.dto.response;

import com.yello.server.domain.cooldown.entity.Cooldown;
import com.yello.server.domain.user.entity.User;
import lombok.Builder;

@Builder
public record YelloStartResponse(
Boolean isStart,
Integer point,
String createdAt
){
) {

@Builder
public YelloStartResponse(Boolean isStart, Integer point, String createdAt) {
this.isStart = isStart;
this.point = point;
this.createdAt = createdAt;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@

import java.util.List;

@Builder
public record YelloVoteResponse(
YelloQuestion question,
List<YelloFriend> friendList,
List<YelloKeyword> keywordList,
Integer questionPoint
) {

@Builder
public YelloVoteResponse(YelloQuestion question, List<YelloFriend> friendList, List<YelloKeyword> keywordList, Integer questionPoint) {
this.question = question;
this.friendList = friendList;
this.keywordList = keywordList;
this.questionPoint = questionPoint;
}

}

0 comments on commit 8465745

Please sign in to comment.