Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class PromisePersonalKeyword {

@Builder
public PromisePersonalKeyword( PromisePersonal promisePersonal, Keyword keyword) {
this.id = new PromisePersonalKeywordId(promisePersonal.getId(), keyword.getId());
this.promisePersonal = promisePersonal;
this.keyword = keyword;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class PromisePersonalPlace {

@Builder
public PromisePersonalPlace(Status status, PromisePersonal promisePersonal, Place place) {
this.id = new PromisePersonalPlaceId(promisePersonal.getId(), place.getId());
this.promisePersonal = promisePersonal;
this.place = place;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class SearchKeyword {

@Builder
public SearchKeyword(Search search, Keyword keyword) {
this.id = new SearchKeywordId(search.getId(), keyword.getId());
this.search = search;
this.keyword = keyword;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

public record ReviewPostRequestDto(
@NotNull(message = "score는 필수 입력값입니다.")
@DecimalMin(value = "1.0", message = "score는 최소 1.0 이상이어야 합니다.")
@DecimalMax(value = "5.0", message = "score는 최대 5.0 이하여야 합니다.")
Double score,
@DecimalMin(value = "1", message = "score는 최소 1 이상이어야 합니다.")
@DecimalMax(value = "10", message = "score는 최대 10 이하여야 합니다.")
Integer score,

@Size(max = 50, message = "note는 최대 50자까지 입력 가능합니다.")
String note,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ public void postReview(@Valid ReviewPostRequestDto requestDto, User user, Long p
.findById(placeId)
.orElseThrow(() -> new InvalidRequestException("존재 하지 않는 place입니다."));


SearchKeyword searchKeyword = SearchKeyword.builder().build();

Search search = Search.builder()
.user(user)
.place(place)
.note(requestDto.note())
.score(requestDto.score())
.build();
searchRepository.save(search);

Expand Down