Skip to content

Commit 2d863c9

Browse files
committed
[BOOK-507] feat: 도서 기록 감정 선택 UI 개선 - #271
1 parent f5e1f3c commit 2d863c9

12 files changed

Lines changed: 1116 additions & 488 deletions

src/Projects/BKDomain/Sources/DomainAssembly.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,5 +262,10 @@ public struct DomainAssembly: Assembly {
262262
@Autowired var repository: EmotionRepository
263263
return DefaultFetchDetailEmotionsUseCase(repository: repository)
264264
}
265+
266+
container.register(type: OpenExternalLinkUseCase.self) { _ in
267+
@Autowired var repository: ExternalLinkRepository
268+
return DefaultOpenExternalLinkUseCase(repository: repository)
269+
}
265270
}
266271
}

src/Projects/BKDomain/Sources/Entity/PrimaryEmotion.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,15 @@ public enum PrimaryEmotion: String, CaseIterable, Codable {
4242
case .other: return .other
4343
}
4444
}
45+
46+
/// Emotion에서 변환
47+
public static func from(emotion: Emotion) -> PrimaryEmotion {
48+
switch emotion {
49+
case .warmth: return .warmth
50+
case .joy: return .joy
51+
case .sad: return .sadness
52+
case .insight: return .insight
53+
case .other: return .other
54+
}
55+
}
4556
}

0 commit comments

Comments
 (0)