-
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.
* feat : 필터링 조건 dto 및 응답 dto * feat : 필터링 검색 api, usecase * feat : 필터링 쿼리 및 테스트(기존 쿼리 활용) * edit : user entity join 제거 * fix : 테스트 코드 오류 수정
- Loading branch information
1 parent
066f418
commit 2609c42
Showing
10 changed files
with
258 additions
and
57 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
24 changes: 24 additions & 0 deletions
24
adapters/in-web/src/main/kotlin/com/pokit/content/dto/request/ContentSearchParams.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,24 @@ | ||
package com.pokit.content.dto.request | ||
|
||
import org.springframework.format.annotation.DateTimeFormat | ||
import java.time.LocalDate | ||
|
||
data class ContentSearchParams( | ||
val categoryId: Long?, | ||
val isRead: Boolean?, | ||
val favorites: Boolean?, | ||
@DateTimeFormat(pattern = "yyyy.MM.dd") | ||
val startDate: LocalDate?, | ||
@DateTimeFormat(pattern = "yyyy.MM.dd") | ||
val endDate: LocalDate?, | ||
val categoryIds: List<Long>? | ||
) | ||
|
||
internal fun ContentSearchParams.toDto() = ContentSearchCondition( | ||
categoryId = this.categoryId, | ||
isRead = this.isRead, | ||
favorites = this.favorites, | ||
startDate = this.startDate, | ||
endDate = this.endDate, | ||
categoryIds = this.categoryIds | ||
) |
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
Oops, something went wrong.