Skip to content

Commit 78e9e6c

Browse files
committed
[BOOK-163] refactor: �apis - 코드컨벤션에 맞게 리팩토링 (#52)
1 parent c12c74a commit 78e9e6c

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

apis/src/main/kotlin/org/yapp/apis/auth/dto/request/DeleteTokenRequest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.yapp.apis.auth.dto.response.RefreshTokenResponse
88
name = "DeleteTokenRequest",
99
description = "Request DTO for deleting a refresh token"
1010
)
11-
data class DeleteTokenRequest(
11+
data class DeleteTokenRequest private constructor(
1212
@field:NotBlank(message = "Refresh token must not be blank.")
1313
@Schema(description = "Refresh token to be deleted", example = "eyJhbGciOiJIUz...")
1414
val refreshToken: String? = null

apis/src/main/kotlin/org/yapp/apis/auth/dto/request/FindUserIdentityRequest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import java.util.*
99
name = "FindUserIdentityRequest",
1010
description = "Request DTO to retrieve user identity information using userId"
1111
)
12-
data class FindUserIdentityRequest(
12+
data class FindUserIdentityRequest private constructor(
1313
@Schema(
1414
description = "User ID (UUID format)",
1515
example = "a1b2c3d4-e5f6-7890-1234-56789abcdef0"

apis/src/main/kotlin/org/yapp/apis/auth/dto/request/TokenGenerateRequest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import java.util.*
99
name = "TokenGenerateRequest",
1010
description = "DTO containing information required to save the generated refresh token"
1111
)
12-
data class TokenGenerateRequest(
12+
data class TokenGenerateRequest private constructor(
1313
@field:NotNull(message = "userId must not be null")
1414
@Schema(description = "User ID", example = "f6b7d490-1b1a-4b9f-8e8e-27f8e3a5dafa")
1515
val userId: UUID? = null,

apis/src/main/kotlin/org/yapp/apis/auth/dto/request/UserBooksByIsbnsRequest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import java.util.UUID
99
name = "UserBooksByIsbnsRequest",
1010
description = "Request DTO for finding user books by user ID and a list of ISBNs"
1111
)
12-
data class UserBooksByIsbnsRequest(
12+
data class UserBooksByIsbnsRequest private constructor(
1313
@Schema(
1414
description = "사용자 ID",
1515
example = "1"

apis/src/main/kotlin/org/yapp/apis/book/dto/request/BookSearchRequest.kt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,28 @@ data class BookSearchRequest private constructor(
2828
categoryId = this.categoryId
2929
)
3030
}
31+
32+
companion object {
33+
fun of(
34+
query: String,
35+
queryType: String? = null,
36+
searchTarget: String? = null,
37+
maxResults: Int? = null,
38+
start: Int? = null,
39+
sort: String? = null,
40+
cover: String? = null,
41+
categoryId: Int? = null
42+
): BookSearchRequest {
43+
return BookSearchRequest(
44+
query = query,
45+
queryType = queryType,
46+
searchTarget = searchTarget,
47+
maxResults = maxResults,
48+
start = start,
49+
sort = sort,
50+
cover = cover,
51+
categoryId = categoryId
52+
)
53+
}
54+
}
3155
}

0 commit comments

Comments
 (0)