diff --git a/src/main/java/org/ntlab/nemophila/models/shops/Shop.java b/src/main/java/org/ntlab/nemophila/models/shops/Shop.java index 3559e50..d233070 100644 --- a/src/main/java/org/ntlab/nemophila/models/shops/Shop.java +++ b/src/main/java/org/ntlab/nemophila/models/shops/Shop.java @@ -1,19 +1,20 @@ package org.ntlab.nemophila.models.shops; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import org.ntlab.nemophila.models.accounts.Post; import java.util.ArrayList; public class Shop { - @JsonProperty("id") + @JsonProperty("sid") private String id; - @JsonProperty("name") + @JsonIgnore private String name; - @JsonProperty("longitude") + @JsonIgnore private double longitude; - @JsonProperty("latitude") + @JsonIgnore private double latitude; - + @JsonProperty("posts") private ArrayList posts = new ArrayList<>(); //Getter @@ -55,7 +56,4 @@ public void deletePost(Post post) { posts.remove(post); } - public int getPostsCount() { - return posts.size(); - } }