Skip to content

Commit 82fde36

Browse files
committed
[BOOK-167] chore: 필드명 변경 (isbn -> isbn13)
1 parent 78b28d4 commit 82fde36

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/mapper/ResponseToModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ internal fun BookSearchResponse.toModel(): BookSearchModel {
5454

5555
internal fun BookSummary.toModel(): BookSummaryModel {
5656
return BookSummaryModel(
57-
isbn = isbn,
57+
isbn13 = isbn13,
5858
title = title.decodeHtmlEntities(),
5959
author = author,
6060
publisher = publisher,

core/model/src/main/kotlin/com/ninecraft/booket/core/model/BookSearchModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data class BookSearchModel(
1919

2020
@Stable
2121
data class BookSummaryModel(
22-
val isbn: String = "",
22+
val isbn13: String = "",
2323
val title: String = "",
2424
val author: String = "",
2525
val publisher: String = "",

core/network/src/main/kotlin/com/ninecraft/booket/core/network/response/BookSearchResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ data class BookSearchResponse(
3131

3232
@Serializable
3333
data class BookSummary(
34-
@SerialName("isbn")
35-
val isbn: String,
34+
@SerialName("isbn13")
35+
val isbn13: String,
3636
@SerialName("title")
3737
val title: String,
3838
@SerialName("author")

feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/book/SearchPresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class SearchPresenter @AssistedInject constructor(
104104
.onSuccess {
105105
registeredUserBookId = it.userBookId
106106
books = books.map { book ->
107-
if (book.isbn == selectedBookIsbn) {
107+
if (book.isbn13 == selectedBookIsbn) {
108108
book.copy(userBookStatus = bookStatus)
109109
} else book
110110
}.toPersistentList()

feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/book/SearchUi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ internal fun SearchContent(
229229
) {
230230
items(
231231
count = state.books.size,
232-
key = { index -> state.books[index].isbn },
232+
key = { index -> state.books[index].isbn13 },
233233
) { index ->
234234
Column {
235235
BookItem(
236236
book = state.books[index],
237237
onBookClick = { book ->
238-
state.eventSink(SearchUiEvent.OnBookClick(book.isbn))
238+
state.eventSink(SearchUiEvent.OnBookClick(book.isbn13))
239239
},
240240
enabled = SearchBookStatus.from(state.books[index].userBookStatus) == SearchBookStatus.BEFORE_REGISTRATION,
241241
)

feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/book/component/BookItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private fun BookItemPreview() {
139139
author = "마쓰이에 마사시 마쓰이에 마사시",
140140
publisher = "비채",
141141
coverImageUrl = "https://example.com/sample-book-cover.jpg",
142-
isbn = "",
142+
isbn13 = "",
143143
),
144144
onBookClick = {},
145145
)

0 commit comments

Comments
 (0)