-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEAT#46] 위치 기반 장소 추천 MOCK API 구현
- Loading branch information
Showing
7 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/com/acon/server/spot/api/request/SpotListRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.acon.server.spot.api.request; | ||
|
||
import jakarta.validation.constraints.DecimalMax; | ||
import jakarta.validation.constraints.DecimalMin; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Positive; | ||
import java.util.List; | ||
|
||
public record SpotListRequest( | ||
@NotNull(message = "위도는 필수 입력값입니다.") | ||
@DecimalMin(value = "33.1", message = "위도는 최소 33.1°N 이상이어야 합니다.") | ||
@DecimalMax(value = "38.6", message = "위도는 최대 38.6°N 이하이어야 합니다.") | ||
Double latitude, | ||
|
||
@NotNull(message = "경도는 필수 입력값입니다.") | ||
@DecimalMin(value = "124.6", message = "경도는 최소 124.6°E 이상이어야 합니다.") | ||
@DecimalMax(value = "131.9", message = "경도는 최대 131.9°E 이하이어야 합니다.") | ||
Double longitude, | ||
|
||
@NotNull(message = "상세 조건은 필수 입력값입니다.") | ||
Condition condition, | ||
|
||
@Positive(message = "도보 가능 거리는 양수여야 합니다.") | ||
Integer walkingTime, | ||
|
||
@Positive(message = "가격대는 양수여야 합니다.") | ||
Integer priceRange | ||
) { | ||
|
||
public static record Condition( | ||
String spotType, | ||
List<Filter> filterList | ||
) { | ||
|
||
public static record Filter( | ||
@NotNull(message = "카테고리는 필수 입력값입니다.") | ||
String category, | ||
|
||
@NotNull(message = "옵션 리스트는 필수 입력값입니다.") | ||
List<String> optionList | ||
) { | ||
|
||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/acon/server/spot/api/response/SpotListResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.acon.server.spot.api.response; | ||
|
||
import java.util.List; | ||
|
||
public record SpotListResponse( | ||
List<RecommendedSpot> spotList | ||
) { | ||
|
||
public static record RecommendedSpot( | ||
long id, // 장소 ID | ||
String image, // 장소 이미지 URL | ||
Integer matchingRate, // 취향 일치율 (Optional) | ||
String type, // 장소 분류 | ||
String name, // 장소 이름 | ||
int walkingTime // 도보 시간 | ||
) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters