Skip to content

Commit

Permalink
Merge pull request #185 from mash-up-kr/add/#184-place-category
Browse files Browse the repository at this point in the history
add: 장소 카테고리 값 추가
  • Loading branch information
thguss committed Aug 29, 2024
2 parents a17c1f9 + fbb3c2a commit 24975d6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ data class Place(
val memo: String?,
val confirmed: Boolean,
val reviewCount: Int?,
val category: String?,
val longitude: Double?,
val latitude: Double?,
val openingHours: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ data class AddPlaceRequest(
@field:PositiveOrZero(message = "리뷰 수는 0 이상이어야 합니다.")
@field:Schema(description = "리뷰 수", example = "2")
val reviewCount: Int? = 0,
@field:Schema(description = "장소 카테고리", example = "한식")
val category: String?,
@field:Schema(description = "장소 위치 경도", example = "126.9246033")
val longitude: Double?,
@field:Schema(description = "장소 위치 위도", example = "33.45241976")
Expand Down Expand Up @@ -78,6 +80,7 @@ data class AddPlaceRequest(
memo = memo,
confirmed = false,
reviewCount = reviewCount,
category = category,
longitude = longitude,
latitude = latitude,
openingHours = openingHours,
Expand Down Expand Up @@ -123,6 +126,8 @@ data class ModifyPlaceRequest(
val voteDislikeCount: Short?,
@field:Schema(description = "리뷰 개수", example = "100")
val reviewCount: Int? = 0,
@field:Schema(description = "장소 카테고리", example = "한식")
val category: String?,
@field:Schema(description = "장소 위치 경도", example = "126.9246033")
val longitude: Double?,
@field:Schema(description = "장소 위치 위도", example = "33.45241976")
Expand Down Expand Up @@ -150,6 +155,7 @@ data class ModifyPlaceRequest(
memo = memo,
confirmed = false,
reviewCount = reviewCount,
category = category,
longitude = longitude,
latitude = latitude,
openingHours = openingHours,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ data class PlaceResponse(
var confirmed: Boolean,
@field:Schema(description = "리뷰 개수", example = "100")
val reviewCount: Int? = 0,
@field:Schema(description = "장소 카테고리", example = "한식")
val category: String?,
@field:Schema(description = "영업시간", example = "10:00 ~ 17:00")
val openingHours: String?,
) {
Expand All @@ -54,6 +56,7 @@ data class PlaceResponse(
memo = place.memo,
confirmed = place.confirmed,
reviewCount = place.reviewCount,
category = place.category,
openingHours = place.openingHours,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class PlaceFixture(
private var memo: String? = null,
private var confirmed: Boolean = false,
private var reviewCount: Int = 0,
private var category: String? = "",
private var longitude: Double? = null,
private var latitude: Double? = null,
private var openingHours: String? = null,
Expand Down Expand Up @@ -75,6 +76,7 @@ class PlaceFixture(
memo = this.memo,
confirmed = this.confirmed,
reviewCount = this.reviewCount,
category = this.category,
longitude = this.longitude,
latitude = this.latitude,
openingHours = this.openingHours,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class VoteServiceTest {
memo = null,
confirmed = false,
reviewCount = 0,
category = "고기",
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
Expand Down Expand Up @@ -168,6 +169,7 @@ class VoteServiceTest {
memo = null,
confirmed = false,
reviewCount = 0,
category = "고기",
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
Expand All @@ -189,6 +191,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
)

Expand Down Expand Up @@ -242,6 +245,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
Place(
id = LongTypeId(2),
Expand All @@ -260,6 +264,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
)

Expand Down Expand Up @@ -311,6 +316,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
Place(
id = LongTypeId(2),
Expand All @@ -329,6 +335,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
Place(
id = LongTypeId(3),
Expand All @@ -347,6 +354,7 @@ class VoteServiceTest {
longitude = 126.9246033,
latitude = 33.45241976,
openingHours = "",
category = "고기",
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class PlaceEntity(
var confirmed: Boolean = false,
@Column(name = "review_count", nullable = false)
val reviewCount: Int?,
@Column(name = "category")
val category: String?,
@Column(name = "longitude")
val longitude: Double?,
@Column(name = "latitude")
Expand All @@ -66,6 +68,7 @@ class PlaceEntity(
memo = place.memo,
confirmed = place.confirmed,
reviewCount = place.reviewCount,
category = place.category,
longitude = place.longitude,
latitude = place.latitude,
openingHours = place.openingHours,
Expand All @@ -86,6 +89,7 @@ class PlaceEntity(
memo = memo,
confirmed = confirmed,
reviewCount = reviewCount,
category = category,
longitude = longitude,
latitude = latitude,
openingHours = openingHours,
Expand Down

0 comments on commit 24975d6

Please sign in to comment.