diff --git a/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java b/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java index 5d7443d..2a96458 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java +++ b/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java @@ -28,8 +28,8 @@ public static Location toLocation(RecordCreateRequestDto recordRequestDto, Recor .city(recordRequestDto.getCity()) .country(recordRequestDto.getCountry()) .district(recordRequestDto.getDistrict()) - .xPos(recordRequestDto.getXPos()) - .yPos(recordRequestDto.getYPos()) + .latitude(recordRequestDto.getLatitude()) + .longitude(recordRequestDto.getLongitude()) .record(record) .build(); } diff --git a/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java b/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java index 406e1a2..00538dd 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java +++ b/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java @@ -31,23 +31,23 @@ public class Location extends BaseTimeEntity { private String district; @Column(nullable = false) - private Double xPos; + private Double latitude; @Column(nullable = false) - private Double yPos; + private Double longitude; @OneToOne @JoinColumn(name = "record_id", nullable = false) private Record record; @Builder - public Location(String fullName, String country, String city, String district, Double xPos, Double yPos, Record record) { + public Location(String fullName, String country, String city, String district, Double latitude, Double longitude, Record record) { this.fullName = fullName; this.country = country; this.city = city; this.district = district; - this.xPos = xPos; - this.yPos = yPos; + this.latitude = latitude; + this.longitude = longitude; this.record = record; } } diff --git a/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java b/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java index e027756..408b40b 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java +++ b/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java @@ -33,10 +33,8 @@ public class RecordCreateRequestDto { private String district; @NotNull - @JsonProperty("x_pos") - private Double xPos; + private Double latitude; @NotNull - @JsonProperty("y_pos") - private Double yPos; + private Double longitude; }