diff --git a/src/main/java/com/example/cosmos_serversb/entities/Shop.java b/src/main/java/com/example/cosmos_serversb/entities/Shop.java new file mode 100644 index 0000000..11b6c42 --- /dev/null +++ b/src/main/java/com/example/cosmos_serversb/entities/Shop.java @@ -0,0 +1,65 @@ +package com.example.cosmos_serversb.entities; + +import com.example.cosmos_serversb.views.ShopsView; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonView; + +import java.util.HashSet; +import java.util.Set; + +public class Shop { + /** + * SHOP用のクラス + * + * @param longitude string + * @param latitude String + * @param longitudeRange String + * @param latitudeRange String + * @param shop String + * + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + public String longitude; + @JsonView(ShopsView.getShopsView.class) + public String latitude; + @JsonView(ShopsView.getShopsView.class) + public String longitudeRange; + public String latitudeRange; + public String shop; + + public Set shops = new HashSet<>(); + + public Shop() { + } + + public Shop(String longitude, String latitude, String longitudeRange, String latitudeRange, String shop) { + setlongitude(longitude); + setlatitude(latitude); + setlongitudeRange(longitudeRange); + setlatitudeRange(latitudeRange); + setshop(shop); + } + + public void setlongitude(String longitude) { + this.longitude = longitude; + } + + public void setlatitude(String latitude) { + this.latitude = latitude; + } + + public void setlongitudeRange(String longitudeRange) { + this.longitudeRange = longitudeRange; + } + + public void setlatitudeRange(String latitudeRange) { + this.latitudeRange = latitudeRange; + } + + public void setshop(String shop) { + this.shop = shop; + } + +} \ No newline at end of file