Skip to content

Commit

Permalink
feat: Restaurant 클래스에 location 역직렬화 어노테이션 등록 (#38)
Browse files Browse the repository at this point in the history
- @JsonDeserialize(using = GeoUtils.PointDeserializer.class)
  • Loading branch information
jooda00 committed Sep 3, 2024
1 parent 27785cb commit 7ed208e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.locationtech.jts.geom.Point;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
Expand All @@ -17,6 +19,7 @@
import lombok.NoArgsConstructor;
import oz.yamyam_map.common.entity.BaseEntity;
import oz.yamyam_map.common.enums.RestaurantType;
import oz.yamyam_map.common.util.GeoUtils;

@Entity
@Getter
Expand All @@ -39,11 +42,12 @@ public class Restaurant extends BaseEntity {
private String phoneNumber;

@Column(nullable = false, columnDefinition = "GEOMETRY")
@JsonDeserialize(using = GeoUtils.PointDeserializer.class)
private Point location;

private String OldAddressFull;
private String oldAddressFull;

private String RoadAddressFull;
private String roadAddressFull;

@Embedded
private ReviewRating reviewRating; // 리뷰 평점 데이터를 위한 VO
Expand Down

0 comments on commit 7ed208e

Please sign in to comment.