diff --git a/piikii-application/src/main/kotlin/com/piikii/application/domain/place/Place.kt b/piikii-application/src/main/kotlin/com/piikii/application/domain/place/Place.kt index 72c41a94..d51ea9ec 100644 --- a/piikii-application/src/main/kotlin/com/piikii/application/domain/place/Place.kt +++ b/piikii-application/src/main/kotlin/com/piikii/application/domain/place/Place.kt @@ -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?, diff --git a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt index 2fe3f4b9..48d347b4 100644 --- a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt +++ b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/request/PlaceRequest.kt @@ -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") @@ -78,6 +80,7 @@ data class AddPlaceRequest( memo = memo, confirmed = false, reviewCount = reviewCount, + category = category, longitude = longitude, latitude = latitude, openingHours = openingHours, @@ -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") @@ -150,6 +155,7 @@ data class ModifyPlaceRequest( memo = memo, confirmed = false, reviewCount = reviewCount, + category = category, longitude = longitude, latitude = latitude, openingHours = openingHours, diff --git a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/response/PlaceResponse.kt b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/response/PlaceResponse.kt index 5d098f09..c1aca0a2 100644 --- a/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/response/PlaceResponse.kt +++ b/piikii-application/src/main/kotlin/com/piikii/application/port/input/dto/response/PlaceResponse.kt @@ -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?, ) { @@ -54,6 +56,7 @@ data class PlaceResponse( memo = place.memo, confirmed = place.confirmed, reviewCount = place.reviewCount, + category = place.category, openingHours = place.openingHours, ) } diff --git a/piikii-application/src/test/kotlin/com/piikii/application/domain/fixture/PlaceFixture.kt b/piikii-application/src/test/kotlin/com/piikii/application/domain/fixture/PlaceFixture.kt index 3e515696..37e7b280 100644 --- a/piikii-application/src/test/kotlin/com/piikii/application/domain/fixture/PlaceFixture.kt +++ b/piikii-application/src/test/kotlin/com/piikii/application/domain/fixture/PlaceFixture.kt @@ -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, @@ -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, diff --git a/piikii-application/src/test/kotlin/com/piikii/application/domain/vote/VoteServiceTest.kt b/piikii-application/src/test/kotlin/com/piikii/application/domain/vote/VoteServiceTest.kt index 23e1c8c5..9a1ce07f 100644 --- a/piikii-application/src/test/kotlin/com/piikii/application/domain/vote/VoteServiceTest.kt +++ b/piikii-application/src/test/kotlin/com/piikii/application/domain/vote/VoteServiceTest.kt @@ -116,6 +116,7 @@ class VoteServiceTest { memo = null, confirmed = false, reviewCount = 0, + category = "고기", longitude = 126.9246033, latitude = 33.45241976, openingHours = "", @@ -168,6 +169,7 @@ class VoteServiceTest { memo = null, confirmed = false, reviewCount = 0, + category = "고기", longitude = 126.9246033, latitude = 33.45241976, openingHours = "", @@ -189,6 +191,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), ) @@ -242,6 +245,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), Place( id = LongTypeId(2), @@ -260,6 +264,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), ) @@ -311,6 +316,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), Place( id = LongTypeId(2), @@ -329,6 +335,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), Place( id = LongTypeId(3), @@ -347,6 +354,7 @@ class VoteServiceTest { longitude = 126.9246033, latitude = 33.45241976, openingHours = "", + category = "고기", ), ) diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt index bd3ae672..c73c726f 100644 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt +++ b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt @@ -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") @@ -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, @@ -86,6 +89,7 @@ class PlaceEntity( memo = memo, confirmed = confirmed, reviewCount = reviewCount, + category = category, longitude = longitude, latitude = latitude, openingHours = openingHours,