-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from Shimpyo-House/feature/open-api-2
feat: Open API에서 더 많은 정보를 활용하도록 구현
- Loading branch information
Showing
44 changed files
with
1,536 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/fc/shimpyo_be/domain/product/dto/response/ProductAmenityResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.fc.shimpyo_be.domain.product.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
public record ProductAmenityResponse( | ||
|
||
boolean barbecue, | ||
boolean beauty, | ||
boolean beverage, | ||
boolean bicycle, | ||
boolean campfire, | ||
boolean fitness, | ||
boolean karaoke, | ||
boolean publicBath, | ||
boolean publicPc, | ||
boolean sauna, | ||
boolean sports, | ||
boolean seminar | ||
) { | ||
|
||
@Builder | ||
public ProductAmenityResponse(boolean barbecue, boolean beauty, boolean beverage, boolean bicycle, | ||
boolean campfire, boolean fitness, boolean karaoke, boolean publicBath, boolean publicPc, | ||
boolean sauna, boolean sports, boolean seminar) { | ||
this.barbecue = barbecue; | ||
this.beauty = beauty; | ||
this.beverage = beverage; | ||
this.bicycle = bicycle; | ||
this.campfire = campfire; | ||
this.fitness = fitness; | ||
this.karaoke = karaoke; | ||
this.publicBath = publicBath; | ||
this.publicPc = publicPc; | ||
this.sauna = sauna; | ||
this.sports = sports; | ||
this.seminar = seminar; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/fc/shimpyo_be/domain/product/dto/response/ProductOptionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.fc.shimpyo_be.domain.product.dto.response; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.Comment; | ||
|
||
public record ProductOptionResponse( | ||
boolean cooking, | ||
boolean parking, | ||
boolean pickup, | ||
String foodPlace, | ||
String infoCenter | ||
|
||
) { | ||
@Builder | ||
public ProductOptionResponse(boolean cooking, boolean parking, boolean pickup, | ||
String foodPlace, | ||
String infoCenter) { | ||
this.cooking = cooking; | ||
this.parking = parking; | ||
this.pickup = pickup; | ||
this.foodPlace = foodPlace; | ||
this.infoCenter = infoCenter; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/com/fc/shimpyo_be/domain/product/entity/Address.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.fc.shimpyo_be.domain.product.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.Comment; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Entity | ||
public class Address { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Comment("숙소 위치 식별자") | ||
private Long id; | ||
@Column(nullable = false) | ||
@Comment("숙소 주소") | ||
private String address; | ||
@Column(nullable = false) | ||
@Comment("숙소 상세 주소") | ||
private String detailAddress; | ||
@Column(nullable = false) | ||
@Comment("숙소 X좌표") | ||
private double mapX; | ||
@Column(nullable = false) | ||
@Comment("숙소 Y좌표") | ||
private double mapY; | ||
|
||
@Builder | ||
public Address(Long id, String address, String detailAddress, double mapX, double mapY) { | ||
this.id = id; | ||
this.address = address; | ||
this.detailAddress = detailAddress; | ||
this.mapX = mapX; | ||
this.mapY = mapY; | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
src/main/java/com/fc/shimpyo_be/domain/product/entity/Amenity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.fc.shimpyo_be.domain.product.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.Comment; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Entity | ||
public class Amenity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Comment("숙소 부대시설 식별자") | ||
private Long id; | ||
@Column(nullable = false) | ||
@Comment("바비큐장 여부") | ||
private boolean barbecue; | ||
@Column(nullable = false) | ||
@Comment("뷰티시설 여부") | ||
private boolean beauty; | ||
@Column(nullable = false) | ||
@Comment("식음료장 여부") | ||
private boolean beverage; | ||
@Column(nullable = false) | ||
@Comment("자전거 대여 여부") | ||
private boolean bicycle; | ||
@Column(nullable = false) | ||
@Comment("캠프파이어 여부") | ||
private boolean campfire; | ||
@Column(nullable = false) | ||
@Comment("휘트니스 센터 여부") | ||
private boolean fitness; | ||
@Column(nullable = false) | ||
@Comment("노래방 여부") | ||
private boolean karaoke; | ||
@Column(nullable = false) | ||
@Comment("공동 샤워실 여부") | ||
private boolean publicBath; | ||
@Column(nullable = false) | ||
@Comment("공동 PC실 여부") | ||
private boolean publicPc; | ||
@Column(nullable = false) | ||
@Comment("사우나 여부") | ||
private boolean sauna; | ||
@Column(nullable = false) | ||
@Comment("스포츠 시설 여부") | ||
private boolean sports; | ||
@Column(nullable = false) | ||
@Comment("세미나실 여부") | ||
private boolean seminar; | ||
|
||
@Builder | ||
public Amenity(Long id, boolean barbecue, boolean beauty, boolean beverage, boolean bicycle, | ||
boolean campfire, boolean fitness, boolean karaoke, boolean publicBath, boolean publicPc, | ||
boolean sauna, boolean sports, boolean seminar) { | ||
this.id = id; | ||
this.barbecue = barbecue; | ||
this.beauty = beauty; | ||
this.beverage = beverage; | ||
this.bicycle = bicycle; | ||
this.campfire = campfire; | ||
this.fitness = fitness; | ||
this.karaoke = karaoke; | ||
this.publicBath = publicBath; | ||
this.publicPc = publicPc; | ||
this.sauna = sauna; | ||
this.sports = sports; | ||
this.seminar = seminar; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.fc.shimpyo_be.domain.product.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.Comment; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Entity | ||
public class ProductOption { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Comment("숙소 옵션 식별자") | ||
private Long id; | ||
@Column(nullable = false) | ||
@Comment("객실 내 취사 여부") | ||
private boolean cooking; | ||
@Column(nullable = false) | ||
@Comment("주차 시설 여부") | ||
private boolean parking; | ||
@Column(nullable = false) | ||
@Comment("픽업 서비스 여부") | ||
private boolean pickup; | ||
@Column(nullable = false) | ||
@Comment("식음료장") | ||
private String foodPlace; | ||
@Column(nullable = true) | ||
@Comment("문의 및 안내") | ||
private String infoCenter; | ||
|
||
@Builder | ||
public ProductOption(Long id, boolean cooking, boolean parking, boolean pickup, | ||
String foodPlace, | ||
String infoCenter) { | ||
this.id = id; | ||
this.cooking = cooking; | ||
this.parking = parking; | ||
this.pickup = pickup; | ||
this.foodPlace = foodPlace; | ||
this.infoCenter = infoCenter; | ||
} | ||
} |
Oops, something went wrong.