-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from NAGAZA-Team/feat/search
- Loading branch information
Showing
12 changed files
with
211 additions
and
55 deletions.
There are no files selected for viewing
9 changes: 7 additions & 2 deletions
9
src/main/kotlin/kr/nagaza/nagazaserver/domain/model/CafeRoom.kt
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package kr.nagaza.nagazaserver.domain.model | ||
|
||
import java.util.* | ||
|
||
data class CafeRoom( | ||
val roomId: String, | ||
val cafeId: String, | ||
val genre: String, | ||
val title: String, | ||
val description: String, | ||
val genre: Set<Genre>, | ||
val timeout: Int, | ||
val recommendedUserCnt: Int, | ||
val roomImgUrl: String?, | ||
val description: String, | ||
val createdAt: Date, | ||
val updatedAt: Date, | ||
) |
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,6 @@ | ||
package kr.nagaza.nagazaserver.domain.model | ||
|
||
data class Genre( | ||
val genreId: String, | ||
val name: String, | ||
) |
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
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
31 changes: 31 additions & 0 deletions
31
src/main/kotlin/kr/nagaza/nagazaserver/infrastructure/jpa/entity/GenreEntity.kt
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,31 @@ | ||
package kr.nagaza.nagazaserver.infrastructure.jpa.entity | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.Id | ||
import kr.nagaza.nagazaserver.domain.model.Genre | ||
|
||
@Entity(name = "genre") | ||
class GenreEntity( | ||
@Id | ||
@Column(name = "genre_id") | ||
val genreId: String, | ||
@Column(name = "name") | ||
val name: String, | ||
) { | ||
fun toModel(): Genre { | ||
return Genre( | ||
genreId = genreId, | ||
name = name, | ||
) | ||
} | ||
|
||
companion object { | ||
fun fromModel(genre: Genre): GenreEntity { | ||
return GenreEntity( | ||
genreId = genre.genreId, | ||
name = genre.name, | ||
) | ||
} | ||
} | ||
} |
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
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
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/dto/request/RoomSearchQuery.kt
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,9 @@ | ||
package kr.nagaza.nagazaserver.presenter.restapi.dto.request | ||
|
||
class RoomSearchQuery( | ||
val queryString: String?, | ||
val address1: String?, | ||
val address2: String?, | ||
val genre: String?, | ||
val cafeId: String?, | ||
) |
Oops, something went wrong.