Skip to content

Commit

Permalink
refactor: mapX, mapY 변수명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoya324 committed Nov 20, 2024
1 parent 1c2ee41 commit ac1c235
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public record RegisterSearchedMarkerRequest(

@NotNull(message = "좌표는 비어있을 수 없습니다.")
@Schema(description = "x 좌표", example = "1269827323")
String mapX,
String mapx,

@NotNull(message = "좌표는 비어있을 수 없습니다.")
@Schema(description = "y 좌표", example = "375719345")
String mapY
String mapy
) {
public Place toEntity() {
Coordinate coordinate = Coordinate.of(this.mapX, this.mapY);
Coordinate coordinate = Coordinate.of(this.mapx, this.mapy);
return Place.builder()
.title(this.title())
.category(resolveCategory(this.category))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public record RegisterYouTubeMarkerRequest(

@NotNull(message = "좌표는 비어있을 수 없습니다.")
@Schema(description = "x 좌표", example = "1269827323")
String mapX,
String mapx,

@NotNull(message = "좌표는 비어있을 수 없습니다.")
@Schema(description = "y 좌표", example = "375719345")
String mapY,
String mapy,

@Schema(description = "전화번호", example = "02-000-000")
String telephone,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/findy/findy_be/place/domain/Place.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class Place extends BaseTimeEntity {
private Category category;

public static Place create(final RegisterYouTubeMarkerRequest request) {
Coordinate coordinate = Coordinate.of(request.mapX(), request.mapY());
Coordinate coordinate = Coordinate.of(request.mapx(), request.mapy());
Category category = Category.of(request.category().majorCategory(), request.category().middleCategory());
return Place.builder()
.address(request.address())
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/findy/findy_be/place/domain/vo/Coordinate.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
public class Coordinate {

@NotNull
private String mapX;
private String mapx;

@NotNull
private String mapY;
private String mapy;

public static Coordinate of(String mapX, String mapY) {
return new Coordinate(mapX, mapY);
public static Coordinate of(String mapx, String mapy) {
return new Coordinate(mapx, mapy);
}

@Override
Expand All @@ -32,11 +32,11 @@ public boolean equals(Object o) {
if (!(o instanceof Coordinate))
return false;
Coordinate that = (Coordinate)o;
return mapX.equals(that.mapX) && mapY.equals(that.mapY);
return mapx.equals(that.mapx) && mapy.equals(that.mapy);
}

@Override
public int hashCode() {
return Objects.hash(mapX, mapY);
return Objects.hash(mapx, mapy);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ public record MarkerPlaceResponse(
String title,
String address,
Category category,
String mapX,
String mapY
String mapx,
String mapy
) {
public static MarkerPlaceResponse of(final Long markerId, final Place place) {
return MarkerPlaceResponse.builder()
.markerId(markerId)
.title(place.getTitle())
.address(place.getAddress())
.category(place.getCategory())
.mapX(place.getCoordinate().getMapX())
.mapY(place.getCoordinate().getMapY())
.mapx(place.getCoordinate().getMapx())
.mapy(place.getCoordinate().getMapy())
.build();
}
}

0 comments on commit ac1c235

Please sign in to comment.