fix: 빌드 에러 수정 - 중복 코드 제거
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -16,19 +16,6 @@ import com.hotdeal.alarm.domain.model.HotDeal
|
||||
]
|
||||
)
|
||||
data class HotDealEntity(
|
||||
@PrimaryKey
|
||||
val id: String,
|
||||
val siteName: String,
|
||||
val boardName: String,
|
||||
val title: String,
|
||||
val url: String,
|
||||
val mallUrl: String?,
|
||||
val createdAt: Long,
|
||||
val isNotified: Boolean = false,
|
||||
val isKeywordMatch: Boolean = false,
|
||||
val isFavorite: Boolean = false, // 즐겨찾기 여부
|
||||
val isPopular: Boolean = false // 인기/핫 게시물 여부
|
||||
) {
|
||||
@PrimaryKey
|
||||
val id: String,
|
||||
val siteName: String,
|
||||
@@ -36,29 +23,16 @@ data class HotDealEntity(
|
||||
val title: String,
|
||||
val url: String,
|
||||
val mallUrl: String?,
|
||||
val createdAt: Long,
|
||||
val isNotified: Boolean = false,
|
||||
val isKeywordMatch: Boolean = false,
|
||||
val isFavorite: Boolean = false // 즐겨찾기 여부
|
||||
val createdAt: Long,
|
||||
val isNotified: Boolean = false,
|
||||
val isKeywordMatch: Boolean = false,
|
||||
val isFavorite: Boolean = false, // 즐겨찾기 여부
|
||||
val isPopular: Boolean = false // 인기/핫 게시물 여부
|
||||
) {
|
||||
/**
|
||||
* Domain 모델로 변환
|
||||
*/
|
||||
fun toDomain(): HotDeal {
|
||||
return HotDeal(
|
||||
id = id,
|
||||
siteName = siteName,
|
||||
boardName = boardName,
|
||||
title = title,
|
||||
url = url,
|
||||
mallUrl = mallUrl,
|
||||
createdAt = createdAt,
|
||||
isNotified = isNotified,
|
||||
isKeywordMatch = isKeywordMatch,
|
||||
isFavorite = isFavorite,
|
||||
isPopular = isPopular
|
||||
)
|
||||
}
|
||||
fun toDomain(): HotDeal {
|
||||
return HotDeal(
|
||||
id = id,
|
||||
siteName = siteName,
|
||||
@@ -67,9 +41,10 @@ data class HotDealEntity(
|
||||
url = url,
|
||||
mallUrl = mallUrl,
|
||||
createdAt = createdAt,
|
||||
isNotified = isNotified,
|
||||
isKeywordMatch = isKeywordMatch,
|
||||
isFavorite = isFavorite
|
||||
isNotified = isNotified,
|
||||
isKeywordMatch = isKeywordMatch,
|
||||
isFavorite = isFavorite,
|
||||
isPopular = isPopular
|
||||
)
|
||||
}
|
||||
|
||||
@@ -77,21 +52,7 @@ data class HotDealEntity(
|
||||
/**
|
||||
* Domain 모델에서 Entity 생성
|
||||
*/
|
||||
fun fromDomain(domain: HotDeal): HotDealEntity {
|
||||
return HotDealEntity(
|
||||
id = domain.id,
|
||||
siteName = domain.siteName,
|
||||
boardName = domain.boardName,
|
||||
title = domain.title,
|
||||
url = domain.url,
|
||||
mallUrl = domain.mallUrl,
|
||||
createdAt = domain.createdAt,
|
||||
isNotified = domain.isNotified,
|
||||
isKeywordMatch = domain.isKeywordMatch,
|
||||
isFavorite = domain.isFavorite,
|
||||
isPopular = domain.isPopular
|
||||
)
|
||||
}
|
||||
fun fromDomain(domain: HotDeal): HotDealEntity {
|
||||
return HotDealEntity(
|
||||
id = domain.id,
|
||||
siteName = domain.siteName,
|
||||
@@ -100,9 +61,10 @@ data class HotDealEntity(
|
||||
url = domain.url,
|
||||
mallUrl = domain.mallUrl,
|
||||
createdAt = domain.createdAt,
|
||||
isNotified = domain.isNotified,
|
||||
isKeywordMatch = domain.isKeywordMatch,
|
||||
isFavorite = domain.isFavorite
|
||||
isNotified = domain.isNotified,
|
||||
isKeywordMatch = domain.isKeywordMatch,
|
||||
isFavorite = domain.isFavorite,
|
||||
isPopular = domain.isPopular
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user